qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arnaudsi...@apache.org
Subject svn commit: r581256 - /incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/InvalidDestinationTest.java
Date Tue, 02 Oct 2007 14:18:47 GMT
Author: arnaudsimon
Date: Tue Oct  2 07:18:46 2007
New Revision: 581256

URL: http://svn.apache.org/viewvc?rev=581256&view=rev
Log:
Changed to use QpidTestCase

Modified:
    incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/InvalidDestinationTest.java

Modified: incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/InvalidDestinationTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/InvalidDestinationTest.java?rev=581256&r1=581255&r2=581256&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/InvalidDestinationTest.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/InvalidDestinationTest.java
Tue Oct  2 07:18:46 2007
@@ -22,15 +22,9 @@
 package org.apache.qpid.test.unit.basic;
 
 import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQDestination;
-import org.apache.qpid.client.AMQSession;
 import org.apache.qpid.client.AMQQueue;
-import org.apache.qpid.client.vmbroker.AMQVMBrokerCreationException;
-import org.apache.qpid.client.transport.TransportConnection;
+import org.apache.qpid.testutil.QpidTestCase;
 
-import junit.framework.TestCase;
-
-import javax.jms.MessageConsumer;
 import javax.jms.Session;
 import javax.jms.QueueSession;
 import javax.jms.Queue;
@@ -38,39 +32,18 @@
 import javax.jms.TextMessage;
 import javax.jms.InvalidDestinationException;
 
-public class InvalidDestinationTest extends TestCase
+public class InvalidDestinationTest extends QpidTestCase
 {
     private AMQConnection _connection;
-    private AMQDestination _destination;
-    private AMQSession _session;
-    private MessageConsumer _consumer;
-
-    private static final String VM_BROKER = "vm://:1";
-
 
     protected void setUp() throws Exception
     {
         super.setUp();
-        createVMBroker();
-        _connection = new AMQConnection(VM_BROKER, "guest", "guest", "ReceiveTestClient",
"test");
-    }
-
-    public void createVMBroker()
-    {
-        try
-        {
-            TransportConnection.createVMBroker(1);
-        }
-        catch (AMQVMBrokerCreationException e)
-        {
-            fail("Unable to create broker: " + e);
-        }
+        _connection = (AMQConnection) getConnection("guest", "guest");
     }
 
     protected void tearDown() throws Exception
     {
-        _connection.close();
-        TransportConnection.killVMBroker(1);
         super.tearDown();
     }
 
@@ -83,7 +56,7 @@
         QueueSession queueSession = _connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
 
         // This is the only easy way to create and bind a queue from the API :-(
-        MessageConsumer consumer = queueSession.createConsumer(validDestination);
+        queueSession.createConsumer(validDestination);
 
         QueueSender sender = queueSession.createSender(invalidDestination);
         TextMessage msg = queueSession.createTextMessage("Hello");



Mime
View raw message