summaryrefslogtreecommitdiff
path: root/qpid
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2007-01-26 14:50:16 +0000
committerKim van der Riet <kpvdr@apache.org>2007-01-26 14:50:16 +0000
commit5dbc10eab6a3496c0c6e6b93e0e2b1e980838d3a (patch)
tree82a21cb8105d971cd7bb4192ad65f7ff37224e97 /qpid
parent67ea38ea733fe1aba28f6087afebce55461c99b0 (diff)
downloadqpid-python-5dbc10eab6a3496c0c6e6b93e0e2b1e980838d3a.tar.gz
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.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@500264 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid')
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
index 18b72e5538..eb559c4279 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
@@ -83,7 +83,6 @@ public class TransactedTest extends TestCase
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 @@ public class TransactedTest extends TestCase
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 @@ public class TransactedTest extends TestCase
expect("B", consumer1.receive(1000));
expect("C", consumer1.receive(1000));
+ testConsumer1 = testSession.createConsumer(queue1);
assertTrue(null == testConsumer1.receive(1000));
assertTrue(null == testConsumer2.receive(1000));
}