[jboss-cvs] JBossAS SVN: r58595 - trunk/testsuite/src/main/org/jboss/test/cluster/partition

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Nov 18 06:49:38 EST 2006


Author: bstansberry at jboss.com
Date: 2006-11-18 06:49:37 -0500 (Sat, 18 Nov 2006)
New Revision: 58595

Removed:
   trunk/testsuite/src/main/org/jboss/test/cluster/partition/StartupTestHAPartition.java
Modified:
   trunk/testsuite/src/main/org/jboss/test/cluster/partition/StartupTestClusterPartition.java
Log:
Reflect refactoring of ClusterPartition

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/partition/StartupTestClusterPartition.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/partition/StartupTestClusterPartition.java	2006-11-18 11:49:07 UTC (rev 58594)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/partition/StartupTestClusterPartition.java	2006-11-18 11:49:37 UTC (rev 58595)
@@ -22,7 +22,7 @@
 package org.jboss.test.cluster.partition;
 
 import org.jboss.ha.framework.server.ClusterPartition;
-import org.jboss.ha.framework.server.HAPartitionImpl;
+import org.jboss.ha.framework.server.ClusterPartitionConfig;
 
 /**
  * ClusterPartition that uses StartupTestHAPartition as its HAPartition impl.
@@ -34,12 +34,11 @@
       extends ClusterPartition
       implements StartupTestClusterPartitionMBean
 {
-   private StartupTestHAPartition startupPartition;
    private HAPartitionRecorderMBean startupRecorder;
    
-   public StartupTestClusterPartition()
+   public StartupTestClusterPartition(ClusterPartitionConfig config)
    {
-      super();
+      super(config);
    }  
    
    public HAPartitionRecorderMBean getStartupRecorder()
@@ -52,17 +51,18 @@
       this.startupRecorder = startupRecorder;
    }
 
-   /**
-    * Extension point meant for test cases; instantiates the HAPartition.
-    * Test cases can instantiate their own subclass of HAPartition impl.
-    */
-   protected HAPartitionImpl createPartition() throws Exception
+   public void create() throws Exception
    {
-      startupPartition = new StartupTestHAPartition(startupRecorder, getPartitionName(), getChannel(), this.getDeadlockDetection(), getServer());
-      startupPartition.setStateTransferTimeout(this.getStateTransferTimeout());
-      startupPartition.setMethodCallTimeout(getMethodCallTimeout());
-      return startupPartition;
-   }
+      try
+      {
+         super.create();
+      }
+      catch (Exception e)
+      {
+         startupRecorder.setStartupException(e);
+         throw e;
+      }
+   }  
    
    
 

Deleted: trunk/testsuite/src/main/org/jboss/test/cluster/partition/StartupTestHAPartition.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/partition/StartupTestHAPartition.java	2006-11-18 11:49:07 UTC (rev 58594)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/partition/StartupTestHAPartition.java	2006-11-18 11:49:37 UTC (rev 58595)
@@ -1,62 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * 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.cluster.partition;
-
-import javax.management.MBeanServer;
-
-import org.jboss.ha.framework.server.HAPartitionImpl;
-import org.jgroups.JChannel;
-
-/**
- * HAPartitionImpl subclass that catches any exception thrown in startService(),
- * storing it in a BadHAPartitionRecorder (where it subsequently can be evaluated 
- * by the test client) before throwing it on.
- * 
- * @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
- * @version $Revision: 1.1 $
- */
-public class StartupTestHAPartition extends HAPartitionImpl
-{
-   private HAPartitionRecorderMBean startupRecorder;
-   
-   public StartupTestHAPartition(HAPartitionRecorderMBean recorder, String partitionName, JChannel channel, boolean deadlock_detection, MBeanServer server)
-         throws Exception
-   {
-      super(partitionName, channel, deadlock_detection, server);
-      this.startupRecorder = recorder;
-   }
-
-   public void startPartition() throws Exception
-   {
-      try
-      {
-         super.startPartition();
-      }
-      catch (Exception e)
-      {
-         startupRecorder.setStartupException(e);
-         throw e;
-      }
-   }  
-   
-   
-}




More information about the jboss-cvs-commits mailing list