[jboss-cvs] JBoss Messaging SVN: r1701 - branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/jms/clustering

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Dec 4 05:35:03 EST 2006


Author: ovidiu.feodorov at jboss.com
Date: 2006-12-04 05:35:01 -0500 (Mon, 04 Dec 2006)
New Revision: 1701

Modified:
   branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/jms/clustering/ClusteringBase.java
   branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/jms/clustering/HATest.java
Log:
temporary changes

Modified: branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/jms/clustering/ClusteringBase.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/jms/clustering/ClusteringBase.java	2006-12-04 10:33:58 UTC (rev 1700)
+++ branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/jms/clustering/ClusteringBase.java	2006-12-04 10:35:01 UTC (rev 1701)
@@ -38,89 +38,81 @@
  * @author <a href="mailto:tim.fox at jboss.org">Tim Fox</a>
  * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
  * @version <tt>$Revision:$</tt>
- *          <p/>
- *          $Id:$
+ * $Id:$
  */
 public class ClusteringBase extends MessagingTestCase
 {
+   // Constants -----------------------------------------------------
 
-   protected Context ic1;
+   // Static --------------------------------------------------------
 
-   protected Context ic2;
+   // Attributes ----------------------------------------------------
 
+   protected Context ic1;
+   protected Context ic2;
    protected Context ic3;
 
    protected Queue queue1;
-
-   protected Topic topic1;
-
    protected Queue queue2;
-
-   protected Topic topic2;
-
    protected Queue queue3;
 
+   protected Topic topic1;
+   protected Topic topic2;
    protected Topic topic3;
 
    protected ConnectionFactory cf1;
-
    protected ConnectionFactory cf2;
-
    protected ConnectionFactory cf3;
 
+   // Constructors --------------------------------------------------
+
    public ClusteringBase(String name)
    {
       super(name);
    }
 
+   // Public --------------------------------------------------------
 
+   // Package protected ---------------------------------------------
+
+   // Protected -----------------------------------------------------
+
    protected void setUp() throws Exception
    {
       super.setUp();
 
       try
       {
-
          ServerManagement.start("all", 0);
-
          ServerManagement.start("all", 1);
+//         ServerManagement.start("all", 2);
 
-         ServerManagement.start("all", 2);
-
-         ServerManagement.deployClusteredQueue("testDistributedQueue", 0);
-         ServerManagement.deployClusteredTopic("testDistributedTopic", 0);
-
-         ServerManagement.deployClusteredQueue("testDistributedQueue", 1);
-         ServerManagement.deployClusteredTopic("testDistributedTopic", 1);
-
-         ServerManagement.deployClusteredQueue("testDistributedQueue", 2);
-         ServerManagement.deployClusteredTopic("testDistributedTopic", 2);
-
-         ic1 = new InitialContext(ServerManagement.getJNDIEnvironment(0));
-
-         ic2 = new InitialContext(ServerManagement.getJNDIEnvironment(1));
-
-         ic3 = new InitialContext(ServerManagement.getJNDIEnvironment(2));
-
-         queue1 = (Queue)ic1.lookup("queue/testDistributedQueue");
-
-         queue2 = (Queue)ic2.lookup("queue/testDistributedQueue");
-
-         queue3 = (Queue)ic3.lookup("queue/testDistributedQueue");
-
-         topic1 = (Topic)ic1.lookup("topic/testDistributedTopic");
-
-         topic2 = (Topic)ic2.lookup("topic/testDistributedTopic");
-
-         topic3 = (Topic)ic3.lookup("topic/testDistributedTopic");
-
-         cf1 = (ConnectionFactory)ic1.lookup("/ConnectionFactory");
-
-         cf2 = (ConnectionFactory)ic2.lookup("/ConnectionFactory");
-
-         cf3 = (ConnectionFactory)ic3.lookup("/ConnectionFactory");
-
-         drainQueues();
+//         ServerManagement.deployClusteredQueue("testDistributedQueue", 0);
+//         ServerManagement.deployClusteredTopic("testDistributedTopic", 0);
+//
+//         ServerManagement.deployClusteredQueue("testDistributedQueue", 1);
+//         ServerManagement.deployClusteredTopic("testDistributedTopic", 1);
+//
+//         ServerManagement.deployClusteredQueue("testDistributedQueue", 2);
+//         ServerManagement.deployClusteredTopic("testDistributedTopic", 2);
+//
+//         ic1 = new InitialContext(ServerManagement.getJNDIEnvironment(0));
+//         ic2 = new InitialContext(ServerManagement.getJNDIEnvironment(1));
+//         ic3 = new InitialContext(ServerManagement.getJNDIEnvironment(2));
+//
+//         queue1 = (Queue)ic1.lookup("queue/testDistributedQueue");
+//         queue2 = (Queue)ic2.lookup("queue/testDistributedQueue");
+//         queue3 = (Queue)ic3.lookup("queue/testDistributedQueue");
+//
+//         topic1 = (Topic)ic1.lookup("topic/testDistributedTopic");
+//         topic2 = (Topic)ic2.lookup("topic/testDistributedTopic");
+//         topic3 = (Topic)ic3.lookup("topic/testDistributedTopic");
+//
+//         cf1 = (ConnectionFactory)ic1.lookup("/ConnectionFactory");
+//         cf2 = (ConnectionFactory)ic2.lookup("/ConnectionFactory");
+//         cf3 = (ConnectionFactory)ic3.lookup("/ConnectionFactory");
+//
+//         drainQueues();
       }
       catch (Exception e)
       {
@@ -145,9 +137,7 @@
          ServerManagement.undeployTopic("testDistributedTopic", 2);
 
          ic1.close();
-
          ic2.close();
-
          ic3.close();
       }
       catch (Exception e)
@@ -160,35 +150,25 @@
    protected void drainQueues() throws Exception
    {
       Connection conn1 = null;
-
       Connection conn2 = null;
-
       Connection conn3 = null;
 
       try
       {
          conn1 = cf1.createConnection();
-
          conn2 = cf2.createConnection();
-
          conn3 = cf3.createConnection();
 
          Session sess1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
          Session sess2 = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
          Session sess3 = conn3.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
          MessageConsumer cons1 = sess1.createConsumer(queue1);
-
          MessageConsumer cons2 = sess2.createConsumer(queue2);
-
          MessageConsumer cons3 = sess3.createConsumer(queue3);
 
          conn1.start();
-
          conn2.start();
-
          conn3.start();
 
          Message msg = null;
@@ -214,12 +194,13 @@
       finally
       {
          if (conn1 != null) conn1.close();
-
          if (conn2 != null) conn2.close();
-
          if (conn3 != null) conn3.close();
       }
    }
 
+   // Private -------------------------------------------------------
 
+   // Inner classes -------------------------------------------------
+
 }

Modified: branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/jms/clustering/HATest.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/jms/clustering/HATest.java	2006-12-04 10:33:58 UTC (rev 1700)
+++ branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/jms/clustering/HATest.java	2006-12-04 10:35:01 UTC (rev 1701)
@@ -31,30 +31,31 @@
 /**
  * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
  * @version <tt>$Revision:$</tt>
- *          <p/>
- *          $Id:$
+ *
+ * $Id:$
  */
 public class HATest extends ClusteringBase
 {
-   protected Logger log = Logger.getLogger(getClass());
 
+   // Constants -----------------------------------------------------
+
+   // Static --------------------------------------------------------
+
+   // Attributes ----------------------------------------------------
+
+   // Constructors --------------------------------------------------
+
    public HATest(String name)
    {
       super(name);
    }
 
-   protected void setUp() throws Exception
-   {
-      super.setUp();
-   }
+   // Public --------------------------------------------------------
 
-   protected void tearDown() throws Exception
-   {
-      super.tearDown();
-   }
-
    public void testLeaveFailover() throws Exception
    {
+      log.info("XXXXXXXXXXXXXXX DONE XXXXXXXXXXXXXXXXXXXXXX");
+      Thread.sleep(999999999);
       try
       {
          System.out.println("Number of nodes on Cluster = " + ServerManagement.getServer(0).getNumberOfNodesOnCluster());
@@ -269,7 +270,22 @@
 //
 //   }
 
+   // Package protected ---------------------------------------------
 
+   // Protected -----------------------------------------------------
+
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+   }
+
+   protected void tearDown() throws Exception
+   {
+      super.tearDown();
+   }
+
+   // Private -------------------------------------------------------
+
    private void receiveMessage(String text, MessageConsumer consumer, boolean shouldAssert, boolean shouldBeNull) throws Exception
    {
       MessageProxy message = (MessageProxy) consumer.receive(3000);
@@ -293,5 +309,6 @@
       }
    }
 
+   // Inner classes -------------------------------------------------
 
 }




More information about the jboss-cvs-commits mailing list