[jboss-cvs] JBossAS SVN: r58939 - in branches/Branch_4_0/testsuite: imports/sections src/main/org/jboss/test/web/test src/resources/web/sso

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Dec 8 18:13:04 EST 2006


Author: bstansberry at jboss.com
Date: 2006-12-08 18:13:01 -0500 (Fri, 08 Dec 2006)
New Revision: 58939

Modified:
   branches/Branch_4_0/testsuite/imports/sections/web.xml
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/web/test/ClusteredSingleSignOnUnitTestCase.java
   branches/Branch_4_0/testsuite/src/resources/web/sso/application.xml
Log:
Test undeploy of both distributed and non-distributed webapps

Modified: branches/Branch_4_0/testsuite/imports/sections/web.xml
===================================================================
--- branches/Branch_4_0/testsuite/imports/sections/web.xml	2006-12-08 22:01:19 UTC (rev 58938)
+++ branches/Branch_4_0/testsuite/imports/sections/web.xml	2006-12-08 23:13:01 UTC (rev 58939)
@@ -358,6 +358,10 @@
          <zipfileset dir="${build.lib}" includes="sso-form-auth-clustered.war"
             fullpath="sso-form-auth2.war"/>
          <zipfileset dir="${build.lib}" includes="sso-expire.war"/>
+        <zipfileset dir="${build.lib}" includes="sso-form-auth.war"
+           fullpath="sso-form-auth4.war"/>
+        <zipfileset dir="${build.lib}" includes="sso-form-auth.war"
+           fullpath="sso-form-auth5.war"/>
          <zipfileset dir="${build.lib}" includes="jbosstest-web-ejbs.jar"/>
       </zip>
       

Modified: branches/Branch_4_0/testsuite/src/main/org/jboss/test/web/test/ClusteredSingleSignOnUnitTestCase.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/web/test/ClusteredSingleSignOnUnitTestCase.java	2006-12-08 22:01:19 UTC (rev 58938)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/web/test/ClusteredSingleSignOnUnitTestCase.java	2006-12-08 23:13:01 UTC (rev 58939)
@@ -63,7 +63,8 @@
       TestSuite suite = new TestSuite();
       suite.addTest(new ClusteredSingleSignOnUnitTestCase("testSessionExpiration"));
       suite.addTest(new ClusteredSingleSignOnUnitTestCase("testFormAuthSingleSignOn"));
-      suite.addTest(new ClusteredSingleSignOnUnitTestCase("testWebappUndeploy"));
+      suite.addTest(new ClusteredSingleSignOnUnitTestCase("testUndeployNonClusteredWebapp"));
+      suite.addTest(new ClusteredSingleSignOnUnitTestCase("testUndeployClusteredWebapp"));
       
       return JBossClusteredTestCase.getDeploySetup(suite, "web-sso-clustered.ear");
    }
@@ -96,6 +97,20 @@
       log.debug("deployed1 = " + deployed1);
    }
    
+   public void testUndeployNonClusteredWebapp() throws Exception
+   {
+      log.info("+++ testUndeployNonClusteredWebapp");
+      
+      webappUndeployTest("war4", "war5");
+   }
+   
+   public void testUndeployClusteredWebapp() throws Exception
+   {
+      log.info("+++ testUndeployClusteredWebapp");
+      
+      webappUndeployTest("war1", "war2");
+   }
+   
    /**
     * Tests that undeploying a webapp on one server doesn't kill an sso
     * that also has a session from another webapp associated with it.
@@ -106,7 +121,7 @@
     *
     * @throws Exception
     */
-   public void testWebappUndeploy() throws Exception
+   private void webappUndeployTest(String firstWar, String secondWar) throws Exception
    {
       log.info("+++ testWebappUndeploy");
       
@@ -115,9 +130,9 @@
       String serverA = httpURLs[0];
       String serverB = httpURLs[1];
       
-      String warA1 = serverA + "/war1/";
-      String warB1 = serverB + "/war1/";
-      String warB2 = serverB + "/war2/";
+      String warA1 = serverA + "/" + firstWar +"/";
+      String warB1 = serverB + "/" + firstWar +"/";
+      String warB2 = serverB + "/" + secondWar +"/";
       
       // Start by accessing the secured index.html of war1
       HttpClient httpConn = new HttpClient();

Modified: branches/Branch_4_0/testsuite/src/resources/web/sso/application.xml
===================================================================
--- branches/Branch_4_0/testsuite/src/resources/web/sso/application.xml	2006-12-08 22:01:19 UTC (rev 58938)
+++ branches/Branch_4_0/testsuite/src/resources/web/sso/application.xml	2006-12-08 23:13:01 UTC (rev 58939)
@@ -25,6 +25,18 @@
       </web>
    </module>
    <module>
+      <web>
+         <web-uri>sso-form-auth4.war</web-uri>
+         <context-root>/war4</context-root>
+      </web>
+   </module>
+   <module>
+      <web>
+         <web-uri>sso-form-auth5.war</web-uri>
+         <context-root>/war5</context-root>
+      </web>
+   </module>
+   <module>
       <ejb>jbosstest-web-ejbs.jar</ejb>
    </module>
 </application>




More information about the jboss-cvs-commits mailing list