You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2017/02/07 11:05:44 UTC
qpid-jms git commit: QPIDJMS-257: update tests to remove race between
adding handler and expected frame arriving
Repository: qpid-jms
Updated Branches:
refs/heads/master 34c8d4a22 -> e348e935e
QPIDJMS-257: update tests to remove race between adding handler and expected frame arriving
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/e348e935
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/e348e935
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/e348e935
Branch: refs/heads/master
Commit: e348e935e762cdaba294ac6382136a15bccf4231
Parents: 34c8d4a
Author: Robert Gemmell <ro...@apache.org>
Authored: Tue Feb 7 10:52:38 2017 +0000
Committer: Robert Gemmell <ro...@apache.org>
Committed: Tue Feb 7 10:52:38 2017 +0000
----------------------------------------------------------------------
.../jms/integration/ConsumerIntegrationTest.java | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e348e935/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConsumerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConsumerIntegrationTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConsumerIntegrationTest.java
index bc1b9a2..67ffab2 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConsumerIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConsumerIntegrationTest.java
@@ -1355,12 +1355,13 @@ public class ConsumerIntegrationTest extends QpidJmsTestCase {
for (int i = 1; i <= consumeCount; i++) {
testPeer.expectDisposition(true, new AcceptedMatcher());
}
+ // Now the consumer should close.
+ testPeer.expectDetach(true, true, true);
// Ack the last read message, which should accept all previous messages as well.
receivedMessage.get().acknowledge();
- // Now the consumer should close.
- testPeer.expectDetach(true, true, true);
+ testPeer.waitForAllHandlersToComplete(3000);
testPeer.expectClose();
connection.close();
@@ -1415,12 +1416,13 @@ public class ConsumerIntegrationTest extends QpidJmsTestCase {
for (int i = 1; i <= consumeCount; i++) {
testPeer.expectDisposition(true, new AcceptedMatcher());
}
+ // Now the consumer should close.
+ testPeer.expectDetach(true, true, true);
// Ack the last read message, which should accept all previous messages as well.
receivedMessage.acknowledge();
- // Now the consumer should close.
- testPeer.expectDetach(true, true, true);
+ testPeer.waitForAllHandlersToComplete(3000);
testPeer.expectClose();
connection.close();
@@ -1550,13 +1552,12 @@ public class ConsumerIntegrationTest extends QpidJmsTestCase {
testPeer.waitForAllHandlersToComplete(3000);
testPeer.expectDisposition(true, new AcceptedMatcher());
+ // Now the consumer should close.
+ testPeer.expectDetach(true, false, true);
// Ack the read message, which should accept all previous messages as well.
receivedMessage.acknowledge();
- // Now the consumer should close.
- testPeer.expectDetach(true, false, true);
-
assertTrue("Did not get timed out error", errorLatch.await(10, TimeUnit.SECONDS));
testPeer.expectClose();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org