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 2014/11/12 17:25:46 UTC
[9/9] qpid-jms git commit: when matching the detach as not closed,
allow either the explicit false or the default false through not
being present
when matching the detach as not closed, allow either the explicit false or the default false through not being present
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/7a0439e4
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/7a0439e4
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/7a0439e4
Branch: refs/heads/master
Commit: 7a0439e437847dda8466911204e4ad0019178b87
Parents: af58ec0
Author: Robert Gemmell <ro...@apache.org>
Authored: Wed Nov 12 16:21:41 2014 +0000
Committer: Robert Gemmell <ro...@apache.org>
Committed: Wed Nov 12 16:21:41 2014 +0000
----------------------------------------------------------------------
.../apache/qpid/jms/test/testpeer/TestAmqpPeer.java | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/7a0439e4/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
index ca69fa8..8f0eb8c 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
@@ -25,7 +25,6 @@ import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
import java.io.IOException;
-import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
@@ -640,7 +639,17 @@ public class TestAmqpPeer implements AutoCloseable
public void expectDetach(boolean expectClosed, boolean sendResponse, boolean replyClosed)
{
- final DetachMatcher detachMatcher = new DetachMatcher().withClosed(equalTo(expectClosed));
+ Matcher<Boolean> closeMatcher = null;
+ if(expectClosed)
+ {
+ closeMatcher = equalTo(true);
+ }
+ else
+ {
+ closeMatcher = Matchers.anyOf(equalTo(false), nullValue());
+ }
+
+ final DetachMatcher detachMatcher = new DetachMatcher().withClosed(closeMatcher);
if (sendResponse)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org