qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject [2/8] qpid-jms git commit: make sending the End response optional, so the test peer can do other things before we make it reply
Date Fri, 06 Mar 2015 16:35:44 GMT
make sending the End response optional, so the test peer can do other things before we make
it reply


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

Branch: refs/heads/master
Commit: a7c2a9bf695d4871449711f6abcc45e3a2863303
Parents: f382069
Author: Robert Gemmell <robbie@apache.org>
Authored: Fri Mar 6 12:17:12 2015 +0000
Committer: Robert Gemmell <robbie@apache.org>
Committed: Fri Mar 6 12:17:12 2015 +0000

----------------------------------------------------------------------
 .../qpid/jms/test/testpeer/TestAmqpPeer.java    | 29 ++++++++++++--------
 1 file changed, 18 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/a7c2a9bf/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 350a5f5..90a9b40 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
@@ -479,21 +479,28 @@ public class TestAmqpPeer implements AutoCloseable
 
     public void expectEnd()
     {
+        expectEnd(true);
+    }
+
+    public void expectEnd(boolean sendResponse)
+    {
         final EndMatcher endMatcher = new EndMatcher();
 
-        final EndFrame endResponse = new EndFrame();
+        if (sendResponse) {
+            final EndFrame endResponse = new EndFrame();
 
-        // The response frame channel will be dynamically set based on the incoming frame.
Using the -1 is an illegal placeholder.
-        final FrameSender frameSender = new FrameSender(this, FrameType.AMQP, -1, endResponse,
null);
-        frameSender.setValueProvider(new ValueProvider()
-        {
-            @Override
-            public void setValues()
+            // The response frame channel will be dynamically set based on the incoming frame.
Using the -1 is an illegal placeholder.
+            final FrameSender frameSender = new FrameSender(this, FrameType.AMQP, -1, endResponse,
null);
+            frameSender.setValueProvider(new ValueProvider()
             {
-                frameSender.setChannel(endMatcher.getActualChannel());
-            }
-        });
-        endMatcher.onSuccess(frameSender);
+                @Override
+                public void setValues()
+                {
+                    frameSender.setChannel(endMatcher.getActualChannel());
+                }
+            });
+            endMatcher.onSuccess(frameSender);
+        }
 
         addHandler(endMatcher);
     }


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


Mime
View raw message