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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jul 5 22:36:30 EDT 2007


Author: bstansberry at jboss.com
Date: 2007-07-05 22:36:30 -0400 (Thu, 05 Jul 2007)
New Revision: 63854

Modified:
   trunk/testsuite/src/main/org/jboss/test/cluster/test/SessionPassivationTestCase.java
   trunk/testsuite/src/main/org/jboss/test/cluster/test/UndeployTestCase.java
Log:
Separate session passivation tests into their own classes

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/test/SessionPassivationTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/test/SessionPassivationTestCase.java	2007-07-06 02:33:35 UTC (rev 63853)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/test/SessionPassivationTestCase.java	2007-07-06 02:36:30 UTC (rev 63854)
@@ -263,4 +263,66 @@
       
       assertEquals("attribute match after activation", attr0, attr2);      
    }
+   
+   /**
+    * Tests the ability to passivate sessions on undeployment of an application
+    * and to activate it on restart or redeployment of an application
+    * @throws Exception
+    */
+   public void testRedeploy() throws Exception
+   {
+       getLog().info("Enter testRedeploy");
+       
+       getLog().debug(setUrl + ":::::::" + getUrl);
+       
+       // force deployment
+       RMIAdaptor[] adaptors = getAdaptors();
+       String warName = getWarName() + ".war";
+       deploy(adaptors[0], warName);
+       deploy(adaptors[1], warName);
+       
+       sleep(2000);
+          
+        // the code above should be removed when we figure out what's wrong 
+        // with configure cluster.
+       
+       // Create an instance of HttpClient.
+       HttpClient client = new HttpClient();
+
+       // Set the session attribute first
+       makeGet(client, baseURL0_ +setUrl);
+       
+       // replicate the session to server1
+       sleepThread(DEFAULT_SLEEP);
+       
+       //   Get the Attribute set
+       String attr = makeGetWithState(client, baseURL0_ +getUrl);
+       
+       // Make connection to server 1 and get
+       setCookieDomainToThisServer(client, servers_[1]);
+       String attr2 = makeGetWithState(client, baseURL1_ + getUrl);
+       
+       assertEquals("attribute match", attr, attr2);
+       
+       
+       
+       // undeploy server0, which passivates the session to the distributed store
+       undeploy(adaptors[0], warName);
+       
+
+       sleep(2000);    
+       // redeploy the application on server 0
+       deploy(adaptors[0], warName);
+
+       sleep(2000);
+       
+       // Get the Attribute using the same session ID
+       setCookieDomainToThisServer(client, servers_[0]);
+       String attr0 = makeGet(client, baseURL0_ +getUrl);
+       
+       assertEquals("attributeMatches after activation", attr0, attr);
+       
+       getLog().debug("Exit testRedeploy");
+       
+   }
 }

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/test/UndeployTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/test/UndeployTestCase.java	2007-07-06 02:33:35 UTC (rev 63853)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/test/UndeployTestCase.java	2007-07-06 02:36:30 UTC (rev 63854)
@@ -56,11 +56,11 @@
     *
     * @throws Exception
     */
-   public void testNonPrimitiveGet()
+   public void testRedeploy()
          throws Exception
    {
       String attr = "";
-      getLog().info("Enter testNonPrimitiveGet");
+      getLog().info("Enter testRedeploy");
 
       getLog().debug(setUrl_ + ":::::::" + getUrl_);
 
@@ -83,71 +83,9 @@
       String attr2 = makeGetWithState(client, baseURL1_ + getUrl_);
 
       assertEquals("Get attribute should be but is ", attr, attr2);
-      getLog().debug("Exit testNonPrimitiveGet");
+      getLog().debug("Exit testRedeploy");
    }
-   
-   /**
-    * Tests the ability to passivate sessions on undeployment of an application
-    * and to activate it on restart or redeployment of an application
-    * @throws Exception
-    */
-   public void XtestSessionPassivationActivation() throws Exception
-   {
-	   getLog().info("Enter testSessionPassivationActivation");
-	   
-	   getLog().debug(setUrl_ + ":::::::" + getUrl_);
-       
-       // force deployment
-       RMIAdaptor[] adaptors = getAdaptors();
-       String warName = getWarName();
-       deploy(adaptors[0], warName);
-       deploy(adaptors[1], warName);
-       
-       sleep(2000);
-          
-        // the code above should be removed when we figure out what's wrong 
-        // with configure cluster.
-	   
-       // Create an instance of HttpClient.
-	   HttpClient client = new HttpClient();
 
-	   // Set the session attribute first
-	   makeGet(client, baseURL0_ +setUrl_);
-	   
-	   // replicate the session to server1
-	   sleepThread(DEFAULT_SLEEP);
-       
-       //   Get the Attribute set
-       String attr = makeGetWithState(client, baseURL0_ +getUrl_);
-       
-       // Make connection to server 1 and get
-       setCookieDomainToThisServer(client, servers_[1]);
-       String attr2 = makeGetWithState(client, baseURL1_ + getUrl_);
-       
-       assertEquals("attribute match", attr, attr2);
-       
-       
-	   
-	   // undeploy server0, which passivates the session to the distributed store
-       undeploy(adaptors[0], warName);
-       
-
-       sleep(2000);	   
-       // redeploy the application on server 0
-       deploy(adaptors[0], warName);
-
-       sleep(2000);
-       
-       // Get the Attribute using the same session ID
-       setCookieDomainToThisServer(client, servers_[0]);
-       String attr0 = makeGet(client, baseURL0_ +getUrl_);
-       
-       assertEquals("attributeMatches after activation", attr0, attr);
-       
-	   getLog().debug("Exit testSessionPassivationActivation");
-	   
-   }
-
    protected void concatenate()
    {
       setUrl_ = getContextPath() +setUrlBase_;




More information about the jboss-cvs-commits mailing list