[jboss-cvs] JBossAS SVN: r74990 - in trunk/testsuite: src/main/org/jboss/test/web/test and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jun 24 11:28:59 EDT 2008


Author: adrian at jboss.org
Date: 2008-06-24 11:28:59 -0400 (Tue, 24 Jun 2008)
New Revision: 74990

Modified:
   trunk/testsuite/imports/sections/web.xml
   trunk/testsuite/src/main/org/jboss/test/web/test/RootContextUnitTestCase.java
Log:
[JBAS-5626] - Simplify the ear root web context test

Modified: trunk/testsuite/imports/sections/web.xml
===================================================================
--- trunk/testsuite/imports/sections/web.xml	2008-06-24 14:32:58 UTC (rev 74989)
+++ trunk/testsuite/imports/sections/web.xml	2008-06-24 15:28:59 UTC (rev 74990)
@@ -264,6 +264,14 @@
         </fileset>
       </war>
   -->
+
+      <ear earfile="${build.lib}/root-web.ear"
+         appxml="${build.resources}/web/META-INF/application-root.xml">
+         <fileset dir="${build.lib}">
+            <include name="root-web.war"/>
+         </fileset>
+      </ear>
+
       <!-- war to test FORM auth -->
       <war destfile="${build.lib}/form-auth.war"
          webxml="${build.resources}/web/form-auth/form-auth-web.xml">

Modified: trunk/testsuite/src/main/org/jboss/test/web/test/RootContextUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/test/RootContextUnitTestCase.java	2008-06-24 14:32:58 UTC (rev 74989)
+++ trunk/testsuite/src/main/org/jboss/test/web/test/RootContextUnitTestCase.java	2008-06-24 15:28:59 UTC (rev 74990)
@@ -21,17 +21,14 @@
 */
 package org.jboss.test.web.test;
 
-import java.net.URL;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.jboss.test.JBossTestCase;
-import org.jboss.test.JBossTestSetup;
-import org.jboss.test.util.web.HttpUtils;
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.HttpMethodBase;
 import org.apache.commons.httpclient.methods.GetMethod;
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.util.web.HttpUtils;
 
 /**
  * This class tests a root context deployed as an EAR or
@@ -57,18 +54,8 @@
 
    public void testRootContextEAR() throws Exception
    {
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      String queues = loader.getResource("messaging/test-destinations-full-service.xml").toString(); 
-      deploy(queues);
-      try
-      {
-         String response = hitRootContext("jbosstest-web.ear");
-         assertTrue(response.contains("A Root Context Page"));
-      }
-      finally
-      {
-         undeploy(queues);
-      }
+      String response = hitRootContext("root-web.ear");
+      assertTrue(response.contains("A Root Context Page"));
    }
 
    /**




More information about the jboss-cvs-commits mailing list