summaryrefslogtreecommitdiff
path: root/java/client/src
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
commitd830e8e1709f7ac5270665492a121468f80a6c56 (patch)
tree5c7c7546e3009e0fb39b52664547c37de03a745a /java/client/src
parent61c12b1b793e4f18f7027134c15f2bbc0417e001 (diff)
downloadqpid-python-d830e8e1709f7ac5270665492a121468f80a6c56.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/qpid@500264 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src')
-rw-r--r--java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
index 18b72e5538..eb559c4279 100644
--- a/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
+++ b/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));
}