Author: kpvdr
Date: Fri Jan 26 06:40:48 2007
New Revision: 500263

URL: http://svn.apache.org/viewvc?view=rev&rev=500263
Log:
Change to TransactedTest which privents the intermittent error 
junit.framework.ComparisonFailure: expected:<B> but was:<C> (or similar) from 
occurring on either the commit or rollback portion of the test. The error 
occurs when the test consumer testConsumer1 bind frames arrive at the server 
before the message bodies with A,B,C and cause queue 1 to start a round-robin 
distribution for these messages when they finally do arrive.

Modified:
    
incubator/qpid/branches/qpid.0-9/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java

Modified: 
incubator/qpid/branches/qpid.0-9/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java?view=diff&rev=500263&r1=500262&r2=500263
==============================================================================
--- 
incubator/qpid/branches/qpid.0-9/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
 (original)
+++ 
incubator/qpid/branches/qpid.0-9/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
 Fri Jan 26 06:40:48 2007
@@ -76,7 +76,6 @@
 
         testCon = new AMQConnection("vm://:1", "guest", "guest", 
"TestConnection", "/test");
         testSession = testCon.createSession(false, AMQSession.NO_ACKNOWLEDGE);
-        testConsumer1 = testSession.createConsumer(queue1);
         testConsumer2 = testSession.createConsumer(queue2);
         testCon.start();
     }
@@ -107,6 +106,7 @@
         expect("Y", testConsumer2.receive(1000));
         expect("Z", testConsumer2.receive(1000));
 
+        testConsumer1 = testSession.createConsumer(queue1);
         assertTrue(null == testConsumer1.receive(1000));
         assertTrue(null == testConsumer2.receive(1000));
     }
@@ -128,6 +128,7 @@
         expect("B", consumer1.receive(1000));
         expect("C", consumer1.receive(1000));
 
+        testConsumer1 = testSession.createConsumer(queue1);
         assertTrue(null == testConsumer1.receive(1000));
         assertTrue(null == testConsumer2.receive(1000));
     }


Reply via email to