Author: ritchiem
Date: Wed Nov  8 06:04:37 2006
New Revision: 472498

URL: http://svn.apache.org/viewvc?view=rev&rev=472498
Log:
Proper fix for timing out tests

Modified:
    
incubator/qpid/trunk/qpid/java/client/test/src/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java
    
incubator/qpid/trunk/qpid/java/client/test/src/org/apache/qpid/test/unit/client/message/ObjectMessageTest.java

Modified: 
incubator/qpid/trunk/qpid/java/client/test/src/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/test/src/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java?view=diff&rev=472498&r1=472497&r2=472498
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/client/test/src/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/client/test/src/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java
 Wed Nov  8 06:04:37 2006
@@ -25,9 +25,9 @@
 import org.apache.qpid.client.vmbroker.AMQVMBrokerCreationException;
 import org.apache.qpid.client.transport.TransportConnection;
 import org.junit.Test;
-import org.junit.Before;
-import org.junit.After;
 import org.junit.Assert;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 
 import javax.jms.*;
 
@@ -217,8 +217,8 @@
         }
     }
 
-    @Before
-    public void createVMBroker() throws Exception
+    @BeforeClass
+    public static void createVMBroker() throws Exception
     {
         try
         {
@@ -230,8 +230,8 @@
         }
     }
 
-    @After
-    public void stopVmBroker()
+    @AfterClass
+    public static void stopVmBroker()
     {
         TransportConnection.killVMBroker(1);
     }

Modified: 
incubator/qpid/trunk/qpid/java/client/test/src/org/apache/qpid/test/unit/client/message/ObjectMessageTest.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/test/src/org/apache/qpid/test/unit/client/message/ObjectMessageTest.java?view=diff&rev=472498&r1=472497&r2=472498
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/client/test/src/org/apache/qpid/test/unit/client/message/ObjectMessageTest.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/client/test/src/org/apache/qpid/test/unit/client/message/ObjectMessageTest.java
 Wed Nov  8 06:04:37 2006
@@ -23,12 +23,11 @@
 import org.apache.qpid.client.AMQSession;
 import org.apache.qpid.client.vmbroker.AMQVMBrokerCreationException;
 import org.apache.qpid.client.transport.TransportConnection;
-import org.apache.qpid.AMQException;
-import org.apache.qpid.url.URLSyntaxException;
-import org.junit.Before;
+
 import org.junit.Test;
 import org.junit.Assert;
-import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 
 import javax.jms.MessageListener;
 import javax.jms.MessageProducer;
@@ -52,8 +51,8 @@
     private final ArrayList items = new ArrayList();
 
 
-    @Before
-    public void createVMBroker()
+    @BeforeClass
+    public static void createVMBroker()
     {
         try
         {
@@ -65,8 +64,8 @@
         }
     }
 
-    @After
-    public void stopVmBroker()
+    @AfterClass
+    public static void stopVmBroker()
     {
         TransportConnection.killVMBroker(1);
     }
@@ -74,6 +73,7 @@
 
     public ObjectMessageTest() throws Exception
     {
+        this(new AMQConnection("vm://:1", "guest", "guest", 
randomize("Client"), "/test_path"));
     }
 
     ObjectMessageTest(String broker) throws Exception


Reply via email to