activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r822235 - in /activemq/branches/activemq-5.3: activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java activemq-xmpp/pom.xml activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java
Date Tue, 06 Oct 2009 12:09:48 GMT
Author: dejanb
Date: Tue Oct  6 12:09:48 2009
New Revision: 822235

URL: http://svn.apache.org/viewvc?rev=822235&view=rev
Log:
merging 822231 - stomp and xmpp test on ibm jdk 6

Modified:
    activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
    activemq/branches/activemq-5.3/activemq-xmpp/pom.xml
    activemq/branches/activemq-5.3/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java

Modified: activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java?rev=822235&r1=822234&r2=822235&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
Tue Oct  6 12:09:48 2009
@@ -85,8 +85,9 @@
         + "}}";
 
     protected void setUp() throws Exception {
-        // The order of the entries is different when using the ibm jdk.
-        if (System.getProperty("java.vendor").equals("IBM Corporation")) {
+        // The order of the entries is different when using ibm jdk 5.
+        if (System.getProperty("java.vendor").equals("IBM Corporation")
+            && System.getProperty("java.version").startsWith("1.5")) {
             xmlMap = "<map>\n" 
                 + "  <entry>\n" 
                 + "    <string>city</string>\n"

Modified: activemq/branches/activemq-5.3/activemq-xmpp/pom.xml
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-xmpp/pom.xml?rev=822235&r1=822234&r2=822235&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-xmpp/pom.xml (original)
+++ activemq/branches/activemq-5.3/activemq-xmpp/pom.xml Tue Oct  6 12:09:48 2009
@@ -145,15 +145,13 @@
     <dependency>
       <groupId>jivesoftware</groupId>
       <artifactId>smack</artifactId>
-      <version>1.5.0</version>
-      <!--<version>2.2.1</version>-->
+      <version>3.1.0</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>jivesoftware</groupId>
       <artifactId>smackx</artifactId>
-      <version>1.5.0</version>
-      <!--<version>2.2.1</version>-->
+      <version>3.1.0</version>
     </dependency>
 
     <dependency>

Modified: activemq/branches/activemq-5.3/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java?rev=822235&r1=822234&r2=822235&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java
(original)
+++ activemq/branches/activemq-5.3/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java
Tue Oct  6 12:09:48 2009
@@ -19,8 +19,11 @@
 import junit.framework.TestCase;
 import junit.textui.TestRunner;
 import org.jivesoftware.smack.Chat;
+import org.jivesoftware.smack.ConnectionConfiguration;
+import org.jivesoftware.smack.MessageListener;
 import org.jivesoftware.smack.XMPPConnection;
 import org.jivesoftware.smack.XMPPException;
+import org.jivesoftware.smack.packet.Message;
 
 /**
  * @version $Revision$
@@ -37,21 +40,27 @@
     }
 
     public void testConnect() throws Exception {
-        // ConnectionConfiguration config = new
-        // ConnectionConfiguration("localhost", 61222);
+        ConnectionConfiguration config = new
+            ConnectionConfiguration("localhost", 61222);
         // config.setDebuggerEnabled(true);
 
         try {
             // SmackConfiguration.setPacketReplyTimeout(1000);
-            // XMPPConnection con = new XMPPConnection(config);
-            XMPPConnection con = new XMPPConnection("localhost", 61222);
+            XMPPConnection con = new XMPPConnection(config);
+            con.connect(); 
             con.login("amq-user", "amq-pwd");
-            Chat chat = con.createChat("test@localhost");
+            Chat chat = con.getChatManager().createChat("test@localhost",
+                new MessageListener() {
+                    public void processMessage(Chat chat, Message message) {
+                        //
+                    }
+                });
             for (int i = 0; i < 10; i++) {
                 System.out.println("Sending message: " + i);
                 chat.sendMessage("Hello from Message: " + i);
             }
             System.out.println("Sent all messages!");
+            con.disconnect();
         } catch (XMPPException e) {
             if (block) {
                 System.out.println("Caught: " + e);



Mime
View raw message