diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2014-10-17 14:23:19 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2014-10-17 14:23:19 +0000 |
| commit | 28dbfe8d101dd14a95b1d75e799107bdaa6e18d0 (patch) | |
| tree | 279390c83b70fb7a41a4d42ee5cda92991140337 /qpid/java/client/src/test | |
| parent | 152b079dacea71ccd5efe7ef0458836d8aea8d2f (diff) | |
| download | qpid-python-28dbfe8d101dd14a95b1d75e799107bdaa6e18d0.tar.gz | |
QPID-6125 : [Java Broker] AMQP 0-8/9/9-1 protocol handler refactoring
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1632583 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client/src/test')
| -rw-r--r-- | qpid/java/client/src/test/java/org/apache/qpid/client/AMQSession_0_8Test.java | 4 | ||||
| -rw-r--r-- | qpid/java/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/client/AMQSession_0_8Test.java b/qpid/java/client/src/test/java/org/apache/qpid/client/AMQSession_0_8Test.java index c56cf9a72b..2a8ab22b81 100644 --- a/qpid/java/client/src/test/java/org/apache/qpid/client/AMQSession_0_8Test.java +++ b/qpid/java/client/src/test/java/org/apache/qpid/client/AMQSession_0_8Test.java @@ -23,7 +23,7 @@ package org.apache.qpid.client; import org.apache.qpid.AMQException; import org.apache.qpid.client.transport.TestNetworkConnection; import org.apache.qpid.framing.AMQShortString; -import org.apache.qpid.framing.amqp_0_91.QueueDeclareOkBodyImpl; +import org.apache.qpid.framing.QueueDeclareOkBody; import org.apache.qpid.test.utils.QpidTestCase; import org.apache.qpid.transport.network.NetworkConnection; import org.apache.qpid.url.AMQBindingURL; @@ -50,7 +50,7 @@ public class AMQSession_0_8Test extends QpidTestCase { try { - _connection.getProtocolHandler().methodBodyReceived(1, new QueueDeclareOkBodyImpl(testQueueName, 0, 0)); + _connection.getProtocolHandler().methodBodyReceived(1, new QueueDeclareOkBody(testQueueName, 0, 0)); } catch (AMQException e) { diff --git a/qpid/java/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java b/qpid/java/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java index 70fcfcedb8..61e5247ead 100644 --- a/qpid/java/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java +++ b/qpid/java/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java @@ -20,6 +20,9 @@ */ package org.apache.qpid.client.protocol; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + import junit.framework.TestCase; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -32,12 +35,10 @@ import org.apache.qpid.client.transport.TestNetworkConnection; import org.apache.qpid.framing.AMQBody; import org.apache.qpid.framing.AMQFrame; import org.apache.qpid.framing.AMQMethodBody; -import org.apache.qpid.framing.amqp_8_0.BasicRecoverOkBodyImpl; +import org.apache.qpid.framing.BasicRecoverSyncOkBody; +import org.apache.qpid.framing.ProtocolVersion; import org.apache.qpid.protocol.AMQConstant; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; - /** * This is a test address QPID-1431 where frame listeners would fail to be notified of an incomming exception. * @@ -75,7 +76,7 @@ public class AMQProtocolHandlerTest extends TestCase //Create a new ProtocolHandler with a fake connection. _handler = new AMQProtocolHandler(new MockAMQConnection("amqp://guest:guest@client/test?brokerlist='tcp://localhost:1'")); _handler.setNetworkConnection(new TestNetworkConnection()); - AMQBody body = BasicRecoverOkBodyImpl.getFactory().newInstance(null, 1); + AMQBody body = new BasicRecoverSyncOkBody(ProtocolVersion.v8_0); _blockFrame = new AMQFrame(0, body); _handleCountDown = new CountDownLatch(1); |
