[hornetq-commits] JBoss hornetq SVN: r11864 - in trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration: clientcrash and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Dec 7 06:02:19 EST 2011


Author: borges
Date: 2011-12-07 06:02:18 -0500 (Wed, 07 Dec 2011)
New Revision: 11864

Modified:
   trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/DeadLetterAddressTest.java
   trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/clientcrash/ClientCrashTest.java
   trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
   trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/NettySymmetricClusterWithBackupTest.java
   trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java
   trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java
Log:
Use stopServer(int...) at ClusterTestBase

Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/DeadLetterAddressTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/DeadLetterAddressTest.java	2011-12-06 21:31:11 UTC (rev 11863)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/DeadLetterAddressTest.java	2011-12-07 11:02:18 UTC (rev 11864)
@@ -355,7 +355,7 @@
          clientSession.rollback();
       }
       ClientMessage m = clientConsumer.receive(500);
-      Assert.assertNull(m);
+      Assert.assertNull("not expecting a message", m);
       clientConsumer.close();
 
       clientConsumer = clientSession.createConsumer(deadLetterQueue);

Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/clientcrash/ClientCrashTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/clientcrash/ClientCrashTest.java	2011-12-06 21:31:11 UTC (rev 11863)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/clientcrash/ClientCrashTest.java	2011-12-07 11:02:18 UTC (rev 11864)
@@ -17,16 +17,13 @@
 
 import org.hornetq.api.core.Message;
 import org.hornetq.api.core.SimpleString;
-import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.client.ClientConsumer;
 import org.hornetq.api.core.client.ClientMessage;
 import org.hornetq.api.core.client.ClientProducer;
 import org.hornetq.api.core.client.ClientSession;
 import org.hornetq.api.core.client.ClientSessionFactory;
-import org.hornetq.api.core.client.HornetQClient;
 import org.hornetq.api.core.client.ServerLocator;
 import org.hornetq.core.logging.Logger;
-import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
 import org.hornetq.jms.client.HornetQTextMessage;
 import org.hornetq.tests.util.SpawnedVMSupport;
 
@@ -148,7 +145,7 @@
       Assert.assertNotNull("no message received", messageFromClient);
       Assert.assertEquals(ClientCrashTest.MESSAGE_TEXT_FROM_CLIENT, messageFromClient.getBodyBuffer().readString());
 
-      assertEquals(2, messageFromClient.getDeliveryCount());
+      assertEquals("delivery count", 2, messageFromClient.getDeliveryCount());
 
       session.close();
 
@@ -161,7 +158,7 @@
    {
       super.setUp();
 
-      locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName()));
+      locator = createNettyNonHALocator();
       addServerLocator(locator);
       locator.setClientFailureCheckPeriod(ClientCrashTest.PING_PERIOD);
       locator.setConnectionTTL(ClientCrashTest.CONNECTION_TTL);

Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java	2011-12-06 21:31:11 UTC (rev 11863)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java	2011-12-07 11:02:18 UTC (rev 11864)
@@ -183,7 +183,7 @@
          {
             // no-op
          }
-         stopComponent(servers[i]);
+         stopServers(i);
       }
       for (int i = 0; i < MAX_SERVERS; i++)
       {

Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/NettySymmetricClusterWithBackupTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/NettySymmetricClusterWithBackupTest.java	2011-12-06 21:31:11 UTC (rev 11863)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/NettySymmetricClusterWithBackupTest.java	2011-12-07 11:02:18 UTC (rev 11864)
@@ -22,7 +22,6 @@
 
 package org.hornetq.tests.integration.cluster.distribution;
 
-import org.hornetq.core.logging.Logger;
 
 /**
  * A NettySymmetricClusterWithBackupTest
@@ -33,8 +32,7 @@
  */
 public class NettySymmetricClusterWithBackupTest extends SymmetricClusterWithBackupTest
 {
-   private Logger log = Logger.getLogger(NettySymmetricClusterWithBackupTest.class);
-   
+
    @Override
    protected boolean isNetty()
    {

Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java	2011-12-06 21:31:11 UTC (rev 11863)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java	2011-12-07 11:02:18 UTC (rev 11864)
@@ -39,20 +39,6 @@
       setupServers();
    }
 
-   @Override
-   protected void tearDown() throws Exception
-   {
-      log.info("#test tearDown");
-      try
-      {
-         stopServers();
-      }
-      finally
-      {
-         super.tearDown();
-      }
-   }
-
    protected boolean isNetty()
    {
       return false;

Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java	2011-12-06 21:31:11 UTC (rev 11863)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java	2011-12-07 11:02:18 UTC (rev 11864)
@@ -248,7 +248,7 @@
       verifyReceiveRoundRobinInSomeOrder(10, 26, 27);
    }
 
-   //@Override
+   @Override
    public void _testStartStopServers() throws Exception
    {
       setupCluster();



More information about the hornetq-commits mailing list