summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Donald Kennedy <grkvlt@apache.org>2011-02-17 15:28:52 +0000
committerAndrew Donald Kennedy <grkvlt@apache.org>2011-02-17 15:28:52 +0000
commitaca757e641ef64516a04aed271a600220b998c64 (patch)
tree7576bd37b8e4284e160914943b1de5b077e9ac2b
parentc8e138d7b2ef48e7a111621473b3e48a6eb61778 (diff)
downloadqpid-python-aca757e641ef64516a04aed271a600220b998c64.tar.gz
QPID-3066: Correct conditions for running UTF8Test
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1071642 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java35
1 files changed, 12 insertions, 23 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java b/java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java
index 81089a4dfc..fe929b4965 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java
@@ -34,9 +34,8 @@ import java.io.*;
/**
- * @author Apache Software Foundation
- * This test makes sure that utf8 characters can be used for
- * specifying exchange, queue name and routing key.
+ * This test makes sure that utf8 characters can be used for
+ * specifying exchange, queue name and routing key.
*
* those tests are related to qpid-1384
*/
@@ -44,7 +43,6 @@ public class UTF8Test extends QpidBrokerTestCase
{
private static final Logger _logger = LoggerFactory.getLogger(UTF8Test.class);
-
public void testPlainEn() throws Exception
{
invoke("UTF8En");
@@ -56,7 +54,6 @@ public class UTF8Test extends QpidBrokerTestCase
invoke("UTF8Jp");
}
-
private void invoke(String name) throws Exception
{
String path = System.getProperties().getProperty("QPID_HOME");
@@ -65,6 +62,7 @@ public class UTF8Test extends QpidBrokerTestCase
runTest(in.readLine(), in.readLine(), in.readLine(), in.readLine());
in.close();
}
+
private void runTest(String exchangeName, String queueName, String routingKey, String data) throws Exception
{
_logger.info("Running test for exchange: " + exchangeName
@@ -89,26 +87,17 @@ public class UTF8Test extends QpidBrokerTestCase
private void declareQueue(String exch, String routkey, String qname) throws Exception
{
- Connection conn = new Connection();
- if (!_broker.equals(QpidBrokerTestCase.EXTERNAL) && !isBroker08())
- {
- conn.connect("localhost", QpidBrokerTestCase.DEFAULT_PORT, "test", "guest", "guest",false);
- }
- else
- {
- throw new Exception("unsupported test " +
- "configuration. broker: " + _broker + " version > 0.10 "+ !isBroker08() + " This test must be run on a local broker using protocol 0.10 or higher.");
- }
- Session sess = conn.createSession(0);
- sess.exchangeDeclare(exch, "direct", null, null);
- sess.queueDeclare(qname, null, null);
- sess.exchangeBind(qname, exch, routkey, null);
- sess.sync();
- conn.close();
+ Connection conn = new Connection();
+ conn.connect("localhost", QpidBrokerTestCase.DEFAULT_PORT, "test", "guest", "guest",false);
+ Session sess = conn.createSession(0);
+ sess.exchangeDeclare(exch, "direct", null, null);
+ sess.queueDeclare(qname, null, null);
+ sess.exchangeBind(qname, exch, routkey, null);
+ sess.sync();
+ conn.close();
}
- private Destination getDestination(String exch, String routkey, String qname)
- throws Exception
+ private Destination getDestination(String exch, String routkey, String qname) throws Exception
{
Properties props = new Properties();
props.setProperty("destination.directUTF8Queue",