summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Shaw <steshaw@apache.org>2006-10-06 10:12:44 +0000
committerSteven Shaw <steshaw@apache.org>2006-10-06 10:12:44 +0000
commita5a13221c8b28b49a3dfaa9a49d943e5e4c9f413 (patch)
treefc4c7609d5b32421e344fd404aeb976c016de0e7
parentea7f384034a44448678a3ee941e77ac1dcb5851c (diff)
downloadqpid-python-a5a13221c8b28b49a3dfaa9a49d943e5e4c9f413.tar.gz
QPID-15 JUnit3 compatibility suite() method now uses correct Test class.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@453537 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/client/test/src/org/apache/qpid/basic/ReceiveTest.java2
-rw-r--r--java/client/test/src/org/apache/qpid/basic/TextMessageTest.java18
2 files changed, 9 insertions, 11 deletions
diff --git a/java/client/test/src/org/apache/qpid/basic/ReceiveTest.java b/java/client/test/src/org/apache/qpid/basic/ReceiveTest.java
index 5b7db2b77c..d72d748935 100644
--- a/java/client/test/src/org/apache/qpid/basic/ReceiveTest.java
+++ b/java/client/test/src/org/apache/qpid/basic/ReceiveTest.java
@@ -75,6 +75,6 @@ public class ReceiveTest
public static junit.framework.Test suite()
{
- return new JUnit4TestAdapter(SessionStartTest.class);
+ return new JUnit4TestAdapter(ReceiveTest.class);
}
}
diff --git a/java/client/test/src/org/apache/qpid/basic/TextMessageTest.java b/java/client/test/src/org/apache/qpid/basic/TextMessageTest.java
index 4f4bbb3028..2b76f64659 100644
--- a/java/client/test/src/org/apache/qpid/basic/TextMessageTest.java
+++ b/java/client/test/src/org/apache/qpid/basic/TextMessageTest.java
@@ -26,10 +26,7 @@ import org.apache.qpid.client.message.JMSTextMessage;
import org.junit.Before;
import org.junit.Test;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
+import javax.jms.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -37,12 +34,12 @@ import java.util.List;
public class TextMessageTest implements MessageListener
{
private AMQConnection _connection;
- private AMQDestination _destination;
+ private Destination _destination;
private AMQSession _session;
private final List<JMSTextMessage> received = new ArrayList<JMSTextMessage>();
private final List<String> messages = new ArrayList<String>();
private int _count = 100;
- public String _connectionString ="vm://:1";
+ public String _connectionString = "vm://:1";
@Before
public void init() throws Exception
@@ -52,14 +49,15 @@ public class TextMessageTest implements MessageListener
private void init(AMQConnection connection) throws Exception
{
- init(connection, new AMQQueue(randomize("TextMessageTest"), true));
+ Destination destination = new AMQQueue(randomize("TextMessageTest"), true);
+ init(connection, destination);
}
- private void init(AMQConnection connection, AMQDestination destination) throws Exception
+ private void init(AMQConnection connection, Destination destination) throws Exception
{
_connection = connection;
_destination = destination;
- _session = (AMQSession) connection.createSession(false, AMQSession.NO_ACKNOWLEDGE);
+ _session = (AMQSession) connection.createSession(false, AMQSession.AUTO_ACKNOWLEDGE);
//set up a slow consumer
_session.createConsumer(destination).setMessageListener(this);
@@ -171,6 +169,6 @@ public class TextMessageTest implements MessageListener
public static junit.framework.Test suite()
{
- return new JUnit4TestAdapter(SessionStartTest.class);
+ return new JUnit4TestAdapter(TextMessageTest.class);
}
}