You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2011/11/22 09:37:12 UTC

svn commit: r1204858 - in /qpid/trunk/qpid/java: systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java test-profiles/CPPExcludes test-profiles/JavaExcludes

Author: kwall
Date: Tue Nov 22 08:37:11 2011
New Revision: 1204858

URL: http://svn.apache.org/viewvc?rev=1204858&view=rev
Log:
QPID-3426: Remove broken/no-value test FailoverTest#test4MinuteFailover

Modified:
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java
    qpid/trunk/qpid/java/test-profiles/CPPExcludes
    qpid/trunk/qpid/java/test-profiles/JavaExcludes

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java?rev=1204858&r1=1204857&r2=1204858&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java Tue Nov 22 08:37:11 2011
@@ -37,16 +37,13 @@ import javax.naming.NamingException;
 
 import org.apache.log4j.Logger;
 import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.jms.BrokerDetails;
 import org.apache.qpid.jms.ConnectionListener;
-import org.apache.qpid.jms.ConnectionURL;
 import org.apache.qpid.test.utils.FailoverBaseCase;
 
 public class FailoverTest extends FailoverBaseCase implements ConnectionListener
 {
     private static final Logger _logger = Logger.getLogger(FailoverTest.class);
 
-    private static final String QUEUE = "queue";
     private static final int DEFAULT_NUM_MESSAGES = 10;
     private static final int DEFAULT_SEED = 20080921;
     protected int numMessages = 0;
@@ -192,7 +189,6 @@ public class FailoverTest extends Failov
     
     protected void runP2PFailover(int totalMessages, boolean consumeAll, boolean produceAll , boolean transacted) throws JMSException, NamingException
     {
-        Message msg = null;
         int toProduce = totalMessages;
         
         _logger.debug("===================================================================");
@@ -281,45 +277,6 @@ public class FailoverTest extends Failov
     } 
 
     /**
-     * The client used to have a fixed timeout of 4 minutes after which failover would no longer work.
-     * Check that this code has not regressed
-     *
-     * @throws Exception if something unexpected occurs in the test.
-     */
-   
-    public void test4MinuteFailover() throws Exception
-    {
-        ConnectionURL connectionURL = getConnectionFactory().getConnectionURL();
-
-        int RETRIES = 4;
-        int DELAY = 60000;
-
-        //Set up a long delay on and large number of retries
-        BrokerDetails details = connectionURL.getBrokerDetails(1);
-        details.setProperty(BrokerDetails.OPTIONS_RETRY, String.valueOf(RETRIES));
-        details.setProperty(BrokerDetails.OPTIONS_CONNECT_DELAY, String.valueOf(DELAY));
-
-        connection = new AMQConnection(connectionURL);
-
-        ((AMQConnection) connection).setConnectionListener(this);
-
-        //Start the connection
-        connection.start();
-
-        long FAILOVER_DELAY = ((long)RETRIES * (long)DELAY);
-
-        // Use Nano seconds as it is more accurate for comparision.
-        long failTime = System.nanoTime() + FAILOVER_DELAY * 1000000;
-
-        //Fail the first broker
-        causeFailure(getFailingPort(), FAILOVER_DELAY + DEFAULT_FAILOVER_TIME);
-
-        //Reconnection should occur
-        assertTrue("Failover did not take long enough", System.nanoTime() > failTime);
-    }
-
-    
-    /**
      * The idea is to run a failover test in a loop by failing over
      * to the other broker each time.
      */

Modified: qpid/trunk/qpid/java/test-profiles/CPPExcludes
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/test-profiles/CPPExcludes?rev=1204858&r1=1204857&r2=1204858&view=diff
==============================================================================
--- qpid/trunk/qpid/java/test-profiles/CPPExcludes (original)
+++ qpid/trunk/qpid/java/test-profiles/CPPExcludes Tue Nov 22 08:37:11 2011
@@ -30,9 +30,6 @@ org.apache.qpid.test.unit.client.AMQSSLC
 org.apache.qpid.test.unit.client.channelclose.ChannelCloseTest#*
 org.apache.qpid.client.ResetMessageListenerTest#*
 
-// This test is not finished
-org.apache.qpid.test.client.failover.FailoverTest#test4MinuteFailover
-
 // Those tests are testing 0.8 specific semantics
 org.apache.qpid.test.testcases.ImmediateMessageTest#test_QPID_517_ImmediateFailsConsumerDisconnectedNoTxP2P
 org.apache.qpid.test.testcases.ImmediateMessageTest#test_QPID_517_ImmediateFailsConsumerDisconnectedTxP2P

Modified: qpid/trunk/qpid/java/test-profiles/JavaExcludes
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/test-profiles/JavaExcludes?rev=1204858&r1=1204857&r2=1204858&view=diff
==============================================================================
--- qpid/trunk/qpid/java/test-profiles/JavaExcludes (original)
+++ qpid/trunk/qpid/java/test-profiles/JavaExcludes Tue Nov 22 08:37:11 2011
@@ -28,10 +28,6 @@ org.apache.qpid.test.client.queue.QueueP
 //Moved from JavaStandaloneExcludes when it was removed
 ///////////////////////////////////////////////////////
 
-// QPID-3426: The following test is broken.
-// This is a long running test so should exclude from normal runs
-org.apache.qpid.test.client.failover.FailoverTest#test4MinuteFailover
-
 // This test may use QpidTestCase but it is not using the getConnection and is hardwired to InVM
 org.apache.qpid.test.unit.client.connection.CloseAfterConnectionFailureTest#*
 



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org