summaryrefslogtreecommitdiff
path: root/qpid/java/client/test
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2006-11-08 14:04:37 +0000
committerMartin Ritchie <ritchiem@apache.org>2006-11-08 14:04:37 +0000
commit2bc85d1a4d6fd6d6b1639848c01dc45ce6cddc73 (patch)
treef3ff4810a132a50b69292c33c0d851e23ff0ef59 /qpid/java/client/test
parentf7d205d99826de4c72aa17d13829bb7004537291 (diff)
downloadqpid-python-2bc85d1a4d6fd6d6b1639848c01dc45ce6cddc73.tar.gz
Proper fix for timing out tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@472498 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client/test')
-rw-r--r--qpid/java/client/test/src/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java12
-rw-r--r--qpid/java/client/test/src/org/apache/qpid/test/unit/client/message/ObjectMessageTest.java16
2 files changed, 14 insertions, 14 deletions
diff --git a/qpid/java/client/test/src/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java b/qpid/java/client/test/src/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java
index ef4d6f829b..485889f297 100644
--- a/qpid/java/client/test/src/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java
+++ b/qpid/java/client/test/src/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java
@@ -25,9 +25,9 @@ import org.apache.qpid.client.AMQTopic;
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 @@ public class MultipleConnectionTest
}
}
- @Before
- public void createVMBroker() throws Exception
+ @BeforeClass
+ public static void createVMBroker() throws Exception
{
try
{
@@ -230,8 +230,8 @@ public class MultipleConnectionTest
}
}
- @After
- public void stopVmBroker()
+ @AfterClass
+ public static void stopVmBroker()
{
TransportConnection.killVMBroker(1);
}
diff --git a/qpid/java/client/test/src/org/apache/qpid/test/unit/client/message/ObjectMessageTest.java b/qpid/java/client/test/src/org/apache/qpid/test/unit/client/message/ObjectMessageTest.java
index 7d2002f216..e671b96bfb 100644
--- a/qpid/java/client/test/src/org/apache/qpid/test/unit/client/message/ObjectMessageTest.java
+++ b/qpid/java/client/test/src/org/apache/qpid/test/unit/client/message/ObjectMessageTest.java
@@ -23,12 +23,11 @@ import org.apache.qpid.client.AMQDestination;
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 @@ public class ObjectMessageTest implements MessageListener
private final ArrayList items = new ArrayList();
- @Before
- public void createVMBroker()
+ @BeforeClass
+ public static void createVMBroker()
{
try
{
@@ -65,8 +64,8 @@ public class ObjectMessageTest implements MessageListener
}
}
- @After
- public void stopVmBroker()
+ @AfterClass
+ public static void stopVmBroker()
{
TransportConnection.killVMBroker(1);
}
@@ -74,6 +73,7 @@ public class ObjectMessageTest implements MessageListener
public ObjectMessageTest() throws Exception
{
+ this(new AMQConnection("vm://:1", "guest", "guest", randomize("Client"), "/test_path"));
}
ObjectMessageTest(String broker) throws Exception