Author: kpvdr
Date: Fri Jan 26 06:50:16 2007
New Revision: 500264
URL: http://svn.apache.org/viewvc?view=rev&rev=500264
Log:
Change to TransactedTest which prevents 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/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
Modified:
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java?view=diff&rev=500264&r1=500263&r2=500264
==============================================================================
---
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
(original)
+++
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
Fri Jan 26 06:50:16 2007
@@ -83,7 +83,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();
}
@@ -115,6 +114,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));
}
@@ -136,6 +136,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));
}