qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject qpid-jms git commit: NO-JIRA Fix race in test on link remote close
Date Thu, 21 Jun 2018 15:28:48 GMT
Repository: qpid-jms
Updated Branches:
  refs/heads/master 88881ba08 -> 1549eecbe


NO-JIRA Fix race in test on link remote close

Ensure that setMessageListener doesn't race the link close by using a
zero prefetch to cause the set to send the link credit.

Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/1549eecb
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/1549eecb
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/1549eecb

Branch: refs/heads/master
Commit: 1549eecbe61797a2fa8423be36af76c54891bf9e
Parents: 88881ba
Author: Timothy Bish <tabish121@gmail.com>
Authored: Thu Jun 21 11:25:39 2018 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Thu Jun 21 11:28:35 2018 -0400

----------------------------------------------------------------------
 .../org/apache/qpid/jms/integration/ConsumerIntegrationTest.java  | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/1549eecb/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 1543f3a..fbc0e41 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
@@ -220,6 +220,9 @@ public class ConsumerIntegrationTest extends QpidJmsTestCase {
                 }
             });
 
+            // Use a zero prefetch to allow setMessageListener to not race link close
+            ((JmsDefaultPrefetchPolicy) connection.getPrefetchPolicy()).setAll(0);
+
             testPeer.expectBegin();
             Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message