qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject [1/6] qpid-jms git commit: simplify processing of handles for temp node creation link
Date Wed, 18 Feb 2015 16:38:23 GMT
Repository: qpid-jms
Updated Branches:
  refs/heads/master 9bb6b0369 -> 98a99d3bc


simplify processing of handles for temp node creation link


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

Branch: refs/heads/master
Commit: 0fc387c79977d23d1370e9514ab453c4e2c1a9ba
Parents: 02143e5
Author: Robert Gemmell <robbie@apache.org>
Authored: Wed Feb 18 15:47:36 2015 +0000
Committer: Robert Gemmell <robbie@apache.org>
Committed: Wed Feb 18 15:47:52 2015 +0000

----------------------------------------------------------------------
 .../org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java  | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/0fc387c7/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 e78faa7..a322355 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
@@ -90,8 +90,6 @@ import org.slf4j.LoggerFactory;
 // TODO should expectXXXYYYZZZ methods just be expect(matcher)?
 public class TestAmqpPeer implements AutoCloseable
 {
-    private static final int LINK_HANDLE_OFFSET = 100;
-
     private static final Logger LOGGER = LoggerFactory.getLogger(TestAmqpPeer.class.getName());
 
     private final TestAmqpPeerRunner _driverRunnable;
@@ -108,8 +106,6 @@ public class TestAmqpPeer implements AutoCloseable
      */
     private CountDownLatch _handlersCompletedLatch;
 
-    private volatile int _tempDestLinkHandle = LINK_HANDLE_OFFSET;
-
     private byte[] _deferredBytes;
 
     public TestAmqpPeer() throws IOException
@@ -475,9 +471,7 @@ public class TestAmqpPeer implements AutoCloseable
                 .withSource(notNullValue())
                 .withTarget(targetMatcher);
 
-        UnsignedInteger linkHandle = UnsignedInteger.valueOf(_tempDestLinkHandle++);
         final AttachFrame attachResponse = new AttachFrame()
-                            .setHandle(linkHandle)
                             .setRole(Role.RECEIVER)
                             .setSndSettleMode(SenderSettleMode.UNSETTLED)
                             .setRcvSettleMode(ReceiverSettleMode.FIRST);
@@ -490,6 +484,7 @@ public class TestAmqpPeer implements AutoCloseable
             public void setValues()
             {
                 attachResponseSender.setChannel(attachMatcher.getActualChannel());
+                attachResponse.setHandle(attachMatcher.getReceivedHandle());
                 attachResponse.setName(attachMatcher.getReceivedName());
                 attachResponse.setSource(attachMatcher.getReceivedSource());
 
@@ -505,8 +500,7 @@ public class TestAmqpPeer implements AutoCloseable
                 .setIncomingWindow(UnsignedInteger.valueOf(2048))
                 .setNextOutgoingId(UnsignedInteger.ONE) //TODO: shouldnt be hard coded
                 .setOutgoingWindow(UnsignedInteger.valueOf(2048))
-                .setLinkCredit(UnsignedInteger.valueOf(100))
-                .setHandle(linkHandle);
+                .setLinkCredit(UnsignedInteger.valueOf(100));
 
         // The flow frame channel will be dynamically set based on the incoming frame. Using
the -1 is an illegal placeholder.
         final FrameSender flowFrameSender = new FrameSender(this, FrameType.AMQP, -1, flowFrame,
null);
@@ -516,6 +510,7 @@ public class TestAmqpPeer implements AutoCloseable
             public void setValues()
             {
                 flowFrameSender.setChannel(attachMatcher.getActualChannel());
+                flowFrame.setHandle(attachMatcher.getReceivedHandle());
                 flowFrame.setDeliveryCount(attachMatcher.getReceivedInitialDeliveryCount());
             }
         });


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


Mime
View raw message