You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gr...@apache.org on 2011/02/17 16:28:52 UTC

svn commit: r1071642 - /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java

Author: grkvlt
Date: Thu Feb 17 15:28:52 2011
New Revision: 1071642

URL: http://svn.apache.org/viewvc?rev=1071642&view=rev
Log:
QPID-3066: Correct conditions for running UTF8Test

Modified:
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java?rev=1071642&r1=1071641&r2=1071642&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java Thu Feb 17 15:28:52 2011
@@ -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 QpidBroker
 {
     private static final Logger _logger = LoggerFactory.getLogger(UTF8Test.class);
 
-
     public void testPlainEn() throws Exception
     {
          invoke("UTF8En");
@@ -56,7 +54,6 @@ public class UTF8Test extends QpidBroker
         invoke("UTF8Jp");
     }
 
-
     private void invoke(String name) throws Exception
     {
         String path = System.getProperties().getProperty("QPID_HOME");
@@ -65,6 +62,7 @@ public class UTF8Test extends QpidBroker
         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 QpidBroker
 
     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",



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org