[jboss-cvs] JBossAS SVN: r100830 - in trunk/testsuite: imports and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Feb 10 17:37:29 EST 2010


Author: bstansberry at jboss.com
Date: 2010-02-10 17:37:27 -0500 (Wed, 10 Feb 2010)
New Revision: 100830

Added:
   trunk/testsuite/src/main/org/jboss/test/web/test/BasicOnDemandWarTestCase.java
Modified:
   trunk/testsuite/build.xml
   trunk/testsuite/imports/server-config.xml
Log:
[JBAS-7713] Add a basic smoke test

Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml	2010-02-10 22:36:53 UTC (rev 100829)
+++ trunk/testsuite/build.xml	2010-02-10 22:37:27 UTC (rev 100830)
@@ -1137,6 +1137,9 @@
     <exclude name="org/jboss/test/ejb3/servlet/unit/ServletUnitTestCase.class"/>
     <exclude name="org/jboss/test/ejb3/servlet/unit/EarServletUnitTestCase.class" /> 
   </patternset>
+  <patternset id="ondemand.war.includes">
+  	  <include name="org/jboss/test/web/test/BasicOnDemandWarTestCase.class"/>
+  </patternset>
 
    <!-- Tests that are currently broken -->
    <patternset id="badtest.excludes">
@@ -1253,6 +1256,7 @@
    	     and doesn't include JPA, so these WebJPA tests are disabled
       <antcall target="tests-web-profile" inheritRefs="true"/>
       -->
+   	<antcall target="tests-web-ondemand-disabled" inheritRefs="true"/>
       <antcall target="tests-jts" inheritRefs="true"/>
    	
       <antcall target="tests-jacc-security" inheritRefs="true"/>
@@ -1510,6 +1514,24 @@
       <server:stop name="tomcat-federation"/>
    </target>
 
+   <!-- Tests that on-demand webapps work if started as part of server start -->
+   <target name="tests-web-ondemand-disabled" depends="init"
+      description="Tests that on-demand webapps work if started as part of server start ">
+      <create-config baseconf="default" newconf="web-ondemand-disabled">
+       <patternset>
+          <include name="conf/**"/>
+          <include name="deployers/**"/>
+          <include name="deploy/**"/>
+          <include name="lib/**"/>           
+       </patternset>
+      </create-config>
+
+      <server:start name="web-ondemand-disabled"/>
+      <run-junit junit.patternset="ondemand.war.includes"
+           junit.configuration="web-ondemand-disabled"  />
+      <server:stop name="web-ondemand-disabled"/>
+   </target>
+
    <target name="tests-binding-manager" depends="init"
      description="Test for clean startup with service binding manager">
    	

Modified: trunk/testsuite/imports/server-config.xml
===================================================================
--- trunk/testsuite/imports/server-config.xml	2010-02-10 22:36:53 UTC (rev 100829)
+++ trunk/testsuite/imports/server-config.xml	2010-02-10 22:37:27 UTC (rev 100830)
@@ -1005,6 +1005,18 @@
         <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
         <sysproperty key="jboss.messaging.ServerPeerID" value="1" />
       </server>
+    	
+      <server name="web-ondemand-disabled" host="${node0}">
+         <jvmarg value="${jpda.cmdline}" />
+         <jvmarg value="-Xms128m" />
+         <jvmarg value="-Xmx256m" />
+         <jvmarg value="-XX:MaxPermSize=512m" />
+         <jvmarg value="-XX:-UseGCOverheadLimit" />
+         <sysproperty key="java.net.preferIPv4Stack" value="true" />
+         <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
+      	<!-- Disable on-demand war deployment -->
+      	<sysproperty key="jboss.as.deployment.ondemand" value="false" />
+      </server>
       
     </server:config>
   

Added: trunk/testsuite/src/main/org/jboss/test/web/test/BasicOnDemandWarTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/test/BasicOnDemandWarTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/web/test/BasicOnDemandWarTestCase.java	2010-02-10 22:37:27 UTC (rev 100830)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.web.test;
+
+import java.net.URL;
+
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.util.web.HttpUtils;
+
+/**
+ * Simple test that accessing the "on demand" webapps works.
+ * 
+ * This test is meant to be executed with on-demand deployment of webapps enabled
+ * and disabled.
+ *
+ * @author Brian Stansberry
+ * 
+ * @version $Revision$
+ */
+public class BasicOnDemandWarTestCase extends JBossTestCase
+{
+   private String baseURL = HttpUtils.getBaseURLNoAuth();
+   
+   public BasicOnDemandWarTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testAdminConsole() throws Exception
+   {
+      onDemandWarTest("admin-console");
+   }
+   
+   public void testJmxConsole() throws Exception
+   {
+      onDemandWarTest("jmx-console");
+   }
+   
+   public void testJBossWSConsole() throws Exception
+   {
+      onDemandWarTest("jbossws");
+   }
+   
+   private void onDemandWarTest(String contextName) throws Exception
+   {
+      URL url = new URL(baseURL + contextName);
+      HttpUtils.accessURL(url);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/web/test/BasicOnDemandWarTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision




More information about the jboss-cvs-commits mailing list