From 245f2793e0a4efd4876ad72b2cf32edc93750d84 Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Thu, 7 Jul 2011 15:10:30 +0000 Subject: QPID-3342: transition TCP based Mina transport for 0-8/0-9/0-9-1 protocols over to new IO interface model Applied patch by Keith Wall and myself git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1143867 13f79535-47bb-0310-9956-ffa450edef68 --- .../client/protocol/AMQProtocolHandlerTest.java | 21 +++++++++++---------- .../client/connectionurl/ConnectionURLTest.java | 21 --------------------- 2 files changed, 11 insertions(+), 31 deletions(-) (limited to 'java/client/src/test') diff --git a/java/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java b/java/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java index f520a21ba0..e54b8ef369 100644 --- a/java/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java +++ b/java/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java @@ -20,23 +20,24 @@ */ package org.apache.qpid.client.protocol; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + import junit.framework.TestCase; -import org.apache.qpid.framing.AMQFrame; + +import org.apache.qpid.AMQException; +import org.apache.qpid.client.AMQAuthenticationException; +import org.apache.qpid.client.MockAMQConnection; +import org.apache.qpid.client.state.AMQState; 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.AMQException; import org.apache.qpid.protocol.AMQConstant; -import org.apache.qpid.transport.TestNetworkDriver; -import org.apache.qpid.client.MockAMQConnection; -import org.apache.qpid.client.AMQAuthenticationException; -import org.apache.qpid.client.state.AMQState; +import org.apache.qpid.transport.TestNetworkConnection; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -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. * @@ -73,7 +74,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='vm://:1'")); - _handler.setNetworkDriver(new TestNetworkDriver()); + _handler.setNetworkConnection(new TestNetworkConnection()); AMQBody body = BasicRecoverOkBodyImpl.getFactory().newInstance(null, 1); _blockFrame = new AMQFrame(0, body); diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java index 2c5fa0112e..a3dfff45f9 100644 --- a/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java +++ b/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java @@ -487,27 +487,6 @@ public class ConnectionURLTest extends TestCase } - public void testSocketProtocol() throws URLSyntaxException - { - String url = "amqp://guest:guest@id/test" + "?brokerlist='socket://VM-Unique-socketID'"; - - try - { - AMQConnectionURL curl = new AMQConnectionURL(url); - assertNotNull(curl); - assertEquals(1, curl.getBrokerCount()); - assertNotNull(curl.getBrokerDetails(0)); - assertEquals(BrokerDetails.SOCKET, curl.getBrokerDetails(0).getTransport()); - assertEquals("VM-Unique-socketID", curl.getBrokerDetails(0).getHost()); - assertEquals("URL does not toString as expected", - url.replace(":guest", ":********"), curl.toString()); - } - catch (URLSyntaxException e) - { - fail(e.getMessage()); - } - } - public void testSingleTransportMultiOptionOnBrokerURL() throws URLSyntaxException { String url = "amqp://guest:guest@/test?brokerlist='tcp://localhost:5672?foo='jim'&bar='bob'&fred='jimmy'',routingkey='jim',timeout='200',immediatedelivery='true'"; -- cgit v1.2.1