[jboss-cvs] JBoss Messaging SVN: r8234 - in branches/Branch_1_4: tests/src/org/jboss/test/messaging/jms/clustering and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Mar 3 00:50:32 EST 2011


Author: gaohoward
Date: 2011-03-03 00:50:32 -0500 (Thu, 03 Mar 2011)
New Revision: 8234

Added:
   branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/clustering/ServerFailover2Test.java
Removed:
   branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/clustering/ServerFailoverTest2.java
Modified:
   branches/Branch_1_4/.classpath
Log:
JBMESSAGING-1842
Change the test name so it can be added into unit tests


Modified: branches/Branch_1_4/.classpath
===================================================================
--- branches/Branch_1_4/.classpath	2011-03-03 05:45:01 UTC (rev 8233)
+++ branches/Branch_1_4/.classpath	2011-03-03 05:50:32 UTC (rev 8234)
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="docs/examples/queue-failover/src"/>
-	<classpathentry kind="src" path="jgroups-src"/>
 	<classpathentry kind="src" path="integration/EAP4/src/main"/>
 	<classpathentry kind="src" path="integration/EAP4/tests-src"/>
 	<classpathentry kind="src" path="docs/examples/bridge/src"/>
@@ -36,7 +35,6 @@
 	<classpathentry kind="lib" path="thirdparty/dom4j/lib/dom4j.jar"/>
 	<classpathentry kind="lib" path="thirdparty/javassist/lib/javassist.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jboss/aop/lib/jdk14-pluggable-instrumentor.jar"/>
-	<classpathentry kind="lib" path="thirdparty/jboss/aop/lib/jrockit-pluggable-instrumentor.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jboss/aop/lib/pluggable-instrumentor.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
 	<classpathentry kind="lib" path="thirdparty/retrotranslator/lib/backport-util-concurrent.jar"/>

Copied: branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/clustering/ServerFailover2Test.java (from rev 8233, branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/clustering/ServerFailoverTest2.java)
===================================================================
--- branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/clustering/ServerFailover2Test.java	                        (rev 0)
+++ branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/clustering/ServerFailover2Test.java	2011-03-03 05:50:32 UTC (rev 8234)
@@ -0,0 +1,114 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+
+package org.jboss.test.messaging.jms.clustering;
+
+import javax.jms.Connection;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
+import org.jboss.test.messaging.tools.ServerManagement;
+import org.jboss.test.messaging.tools.container.ServiceAttributeOverrides;
+import org.jboss.test.messaging.tools.container.ServiceContainer;
+
+/**
+ * A ServerFailoverTest
+ *
+ * @author <a href="mailto:hgao at redhat.com">Howard Gao</a>
+ * 
+ * Created Jun 19, 2009 2:02:15 PM
+ *
+ *
+ */
+public class ServerFailover2Test extends ClusteringTestBase
+{
+   
+   private static final long REFRESH_INTERVAL = 10000;
+   
+   public ServerFailover2Test(String name)
+   {
+      super(name);
+   }
+
+
+   public void setUp() throws Exception
+   {
+      nodeCount = 2;
+      
+      //make the failover follow new behavior
+      //https://issues.jboss.org/browse/JBMESSAGING-1842
+      overrides = new ServiceAttributeOverrides();
+      overrides.put(ServiceContainer.POSTOFFICE_OBJECT_NAME, "KeepOldFailoverModel", Boolean.FALSE);
+      overrides.put(ServiceContainer.POSTOFFICE_OBJECT_NAME, "NodeStateRefreshInterval", new Long(REFRESH_INTERVAL));
+      
+      super.setUp();
+   }
+
+   //start two nodes, send a message to node1, kill node1,
+   //receive from node0, the receive time should be greater than NodeStateRefreshInterval
+   public void testNewFailover() throws Exception
+   {
+      Connection conn = createConnectionOnServer(cf, 1);
+      
+      Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+      MessageProducer prod = session.createProducer(queue[1]);
+      TextMessage message = session.createTextMessage("Message_testNewFailover");
+
+      prod.send(message);
+
+      conn.close();
+      
+      long start = System.currentTimeMillis();
+      
+      ServerManagement.kill(1);
+
+      conn = createConnectionOnServer(cf, 0);
+      
+      session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+      
+      MessageConsumer consumer = session.createConsumer(queue[0]);
+      
+      conn.start();
+      
+      message = (TextMessage)consumer.receive(30000);
+      
+      assertNotNull(message);
+      
+      long stop = System.currentTimeMillis();
+      
+      assertEquals("Message_testNewFailover", message.getText());
+      
+      long duration = stop - start;
+      
+      assertTrue(duration > REFRESH_INTERVAL);
+      
+      conn.close();
+   }
+}
+
+
+
+
+

Deleted: branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/clustering/ServerFailoverTest2.java
===================================================================
--- branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/clustering/ServerFailoverTest2.java	2011-03-03 05:45:01 UTC (rev 8233)
+++ branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/clustering/ServerFailoverTest2.java	2011-03-03 05:50:32 UTC (rev 8234)
@@ -1,114 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-
-package org.jboss.test.messaging.jms.clustering;
-
-import javax.jms.Connection;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.jboss.test.messaging.tools.ServerManagement;
-import org.jboss.test.messaging.tools.container.ServiceAttributeOverrides;
-import org.jboss.test.messaging.tools.container.ServiceContainer;
-
-/**
- * A ServerFailoverTest
- *
- * @author <a href="mailto:hgao at redhat.com">Howard Gao</a>
- * 
- * Created Jun 19, 2009 2:02:15 PM
- *
- *
- */
-public class ServerFailoverTest2 extends ClusteringTestBase
-{
-   
-   private static final long REFRESH_INTERVAL = 10000;
-   
-   public ServerFailoverTest2(String name)
-   {
-      super(name);
-   }
-
-
-   public void setUp() throws Exception
-   {
-      nodeCount = 2;
-      
-      //make the failover follow new behavior
-      //https://issues.jboss.org/browse/JBMESSAGING-1842
-      overrides = new ServiceAttributeOverrides();
-      overrides.put(ServiceContainer.POSTOFFICE_OBJECT_NAME, "KeepOldFailoverModel", Boolean.FALSE);
-      overrides.put(ServiceContainer.POSTOFFICE_OBJECT_NAME, "NodeStateRefreshInterval", new Long(REFRESH_INTERVAL));
-      
-      super.setUp();
-   }
-
-   //start two nodes, send a message to node1, kill node1,
-   //receive from node0, the receive time should be greater than NodeStateRefreshInterval
-   public void testNewFailover() throws Exception
-   {
-      Connection conn = createConnectionOnServer(cf, 1);
-      
-      Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      MessageProducer prod = session.createProducer(queue[1]);
-      TextMessage message = session.createTextMessage("Message_testNewFailover");
-
-      prod.send(message);
-
-      conn.close();
-      
-      long start = System.currentTimeMillis();
-      
-      ServerManagement.kill(1);
-
-      conn = createConnectionOnServer(cf, 0);
-      
-      session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      
-      MessageConsumer consumer = session.createConsumer(queue[0]);
-      
-      conn.start();
-      
-      message = (TextMessage)consumer.receive(30000);
-      
-      assertNotNull(message);
-      
-      long stop = System.currentTimeMillis();
-      
-      assertEquals("Message_testNewFailover", message.getText());
-      
-      long duration = stop - start;
-      
-      assertTrue(duration > REFRESH_INTERVAL);
-      
-      conn.close();
-   }
-}
-
-
-
-
-



More information about the jboss-cvs-commits mailing list