fix race-to-shutdown in test, ensure we expect and wait for the detach response
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/9b1f56ed Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/9b1f56ed Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/9b1f56ed Branch: refs/heads/master Commit: 9b1f56edafd21eee69a3a154e30537e8fee80b0e Parents: 26ed4c2 Author: Robert Gemmell <[email protected]> Authored: Wed Nov 19 16:12:52 2014 +0000 Committer: Robert Gemmell <[email protected]> Committed: Wed Nov 19 16:12:52 2014 +0000 ---------------------------------------------------------------------- .../org/apache/qpid/jms/integration/SessionIntegrationTest.java | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9b1f56ed/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java index 8591574..3ba8801 100644 --- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java @@ -259,6 +259,8 @@ public class SessionIntegrationTest extends QpidJmsTestCase { targetMatcher.withDurable(nullValue());//default = none/0 testPeer.expectSenderAttach(targetMatcher, true, false); + //Expect the detach response to the test peer closing the producer link after refusal. + testPeer.expectDetach(true, false, false); try { session.createProducer(null); @@ -266,6 +268,8 @@ public class SessionIntegrationTest extends QpidJmsTestCase { } catch (JMSException jmse) { //expected } + + testPeer.waitForAllHandlersToComplete(1000); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
