Author: ozizka(a)redhat.com
Date: 2009-05-18 13:21:26 -0400 (Mon, 18 May 2009)
New Revision: 438
Added:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/embwar/
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/embwar/EmbWarTest.java
trunk/jsfunit/testdata/ear/EarWithWarNB-embwar.ear
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
trunk/jsfunit/testdata/
trunk/jsfunit/testdata/hudson_shell_script.sh
Log:
Embedded WAR testcase added.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-05-18
16:47:49 UTC (rev 437)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-05-18
17:21:26 UTC (rev 438)
@@ -136,10 +136,13 @@
public static final String EAR_UNPACKED = "unpacked-ear1.ear";
public static final String EAR_UNPACKED_ZIP = "unpacked-ear1.ear.zip";
public static final String EAR_WITH_WAR = "EarWithWarNB.ear";
+ public static final String EAR_WITH_WAR__WAR_NAME = "EarWithWarNB-war.war";
public static final String EAR_WITH_WAR_COUNTER = "EarWithWar-Counter.ear";
public static final String EAR_WITH_WAR_COUNTER_20 =
"EarWithWar-Counter-20.ear";
public static final String EAR_EXT_DEPENDENCIES = "EarExtDependencies.ear";
public static final String EAR_WITH_RAR = "testscopedrar.ear";
+ public static final String EAR_WITH_WAR_EMB = "EarWithWarNB-embwar.ear";
+ public static final String EAR_WITH_WAR_EMB__WAR_NAME =
"EarWithWarNB-emb_war.war";
// WAR
public static final String BASIC_WAR = "hellothere.war";
Added: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/embwar/EmbWarTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/embwar/EmbWarTest.java
(rev 0)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/embwar/EmbWarTest.java 2009-05-18
17:21:26 UTC (rev 438)
@@ -0,0 +1,60 @@
+package org.jboss.jopr.jsfunit.as5.embwar;
+
+import java.io.IOException;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.jboss.jopr.jsfunit.ApplicationTestBaseAS5;
+import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
+import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTableRow;
+import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.NavTreeNode;
+
+/**
+ *
+ * @author ondra
+ */
+public class EmbWarTest extends ApplicationTestBaseAS5 {
+
+ public static final DeployableTypes APP_TYPE = DeployableTypes.EMB_WAR;
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite(){
+ return new TestSuite(EmbWarTest.class);
+ }
+
+ public void testEarWithEmbWarDeployment() throws IOException, EmbJoprTestException
+ {
+
+ final String DEPLOYABLE_NAME = EAR_WITH_WAR_EMB;
+
+ try {
+ // Deploy the app.
+ String appFilePath = ejtt.getTestDataDir() + "/ear/"+DEPLOYABLE_NAME;
+ ejtt.deployment.deployViaEmbJopr( DeployableTypes.EAR, appFilePath );
+
+ String expectedMessage = DEPLOYABLE_NAME + " created successfully";
+ checkClientAndServerMessages(expectedMessage, expectedMessage, false);
+
+ // Go to the embedded WARs node.
+ NavTreeNode embWarNode = ejtt.navTree.getNodeByLabel(APP_TYPE.getNavTreeLabel());
+ embWarNode.getLabelLink().click();
+
+ // Check that the embedded WAR is listed.
+ ContentTableRow embWarLink =
ejtt.tabMenu.getTabContentBox().findLinkRowInDataTableUsingPagination(EAR_WITH_WAR_EMB__WAR_NAME);
+ if( null == embWarLink )
+ throw new EmbJoprTestException("Embedded WAR
'"+EAR_WITH_WAR_EMB__WAR_NAME+"' not listed.");
+
+ ejtt.deployment.waitActivelyForDeployment(APP_TYPE, EAR_WITH_WAR_EMB__WAR_NAME, 5000,
12);
+
+ }
+ finally {
+ // Undeploy the EAR.
+ ejtt.deployment.undeployViaEmbJopr(APP_TYPE, DEPLOYABLE_NAME);
+ }
+ }// testEarWithEmbWarDeployment()
+
+}// class
+
+
+
Property changes on: trunk/jsfunit/testdata
___________________________________________________________________
Name: svn:ignore
+ EarWithWar-Counter.ear
Added: trunk/jsfunit/testdata/ear/EarWithWarNB-embwar.ear
===================================================================
(Binary files differ)
Property changes on: trunk/jsfunit/testdata/ear/EarWithWarNB-embwar.ear
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/jsfunit/testdata/hudson_shell_script.sh
===================================================================
--- trunk/jsfunit/testdata/hudson_shell_script.sh 2009-05-18 16:47:49 UTC (rev 437)
+++ trunk/jsfunit/testdata/hudson_shell_script.sh 2009-05-18 17:21:26 UTC (rev 438)
@@ -15,19 +15,19 @@
echo "JBOSS_HOME: $JBOSS_HOME"
# Remove bundled AS console
# Name of war changed on 04/24 - smcgowan
-rm -rf $JBOSS_HOME/server/default/deploy/admin-console.war
+rm -rfv $JBOSS_HOME/server/default/deploy/admin-console.war
### List currently used port - why is RMI port in collision?
-/usr/sbin/lsof -i
+lsof -i || /usr/sbin/lsof -i || true
### List JVMs
jps -l
cd embjopr
-mvn install -Dmaven.test.skip=true --fail-never --update-snapshots
+mvn install -Dmaven.test.skip=true --update-snapshots
cd jsfunit
rm -rf target
echo "Launching tests; binding JBoss AS to MYTESTIP_1 == $MYTESTIP_1"
-mvn -Pjboss5x install --fail-never --update-snapshots -DJBOSS_HOME=$JBOSS_HOME
-Dcargo.jboss.bind.address=$MYTESTIP_1
+mvn -Pjboss5x install --fail-never --update-snapshots -DJBOSS_HOME=$JBOSS_HOME
-Dcargo.jboss.bind.address=$MYTESTIP_1 -Dhtmlunit.browser=ie7
sleep 5