riftsaw SVN: r1303 - in trunk: qa and 1 other directories.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2011-02-09 09:35:00 -0500 (Wed, 09 Feb 2011)
New Revision: 1303
Added:
trunk/qa/hudson-riftsaw-jboss-as6.sh
Modified:
trunk/integration-tests/build.xml
trunk/integration-tests/pom.xml
trunk/runtime/deployer-as6/src/main/java/org/jboss/soa/bpel/deployer/as6/AS6BPELDeployer.java
Log:
RIFTSAW-333 - added qa script, but also fixed an issue where on second deployment, it failed as the deployment framework appears to deploy it twice. Still unclear why this is happening, but the deployer has been updated to cope with it for now.
Modified: trunk/integration-tests/build.xml
===================================================================
--- trunk/integration-tests/build.xml 2011-02-07 15:55:03 UTC (rev 1302)
+++ trunk/integration-tests/build.xml 2011-02-09 14:35:00 UTC (rev 1303)
@@ -186,7 +186,9 @@
<ant antfile="src/test/resources/samples/Quickstart_bpel_loan_approval/build.xml" />
<ant antfile="src/test/resources/samples/Tutorial_bpel_atm/build.xml" />
+ <!--
<ant antfile="src/test/resources/samples/Tutorial_bpel_purchase/build.xml" />
+ -->
<ant antfile="src/test/resources/samples/Tutorial_bpel_travel_agency/build.xml" />
<ant antfile="src/test/resources/testcases/RiftSaw_118/build.xml" />
Modified: trunk/integration-tests/pom.xml
===================================================================
--- trunk/integration-tests/pom.xml 2011-02-07 15:55:03 UTC (rev 1302)
+++ trunk/integration-tests/pom.xml 2011-02-09 14:35:00 UTC (rev 1303)
@@ -32,6 +32,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.slf4j</groupId>
+ <artifactId>slf4j-jboss-logging</artifactId>
+ <version>1.0.2.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.jboss.soa.bpel.dependencies.esb</groupId>
<artifactId>jbossesb-rosetta</artifactId>
<version>${jbossesb.version}</version>
Added: trunk/qa/hudson-riftsaw-jboss-as6.sh
===================================================================
--- trunk/qa/hudson-riftsaw-jboss-as6.sh (rev 0)
+++ trunk/qa/hudson-riftsaw-jboss-as6.sh 2011-02-09 14:35:00 UTC (rev 1303)
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# Run Riftsaw Integration tests.
+
+MAVEN_OPTS="-Xms512M -Xmx1024M"
+
+RIFTSAW_PARENT_DIR="$WORKSPACE"
+DOWNLOAD_DIR="$RIFTSAW_PARENT_DIR/downloads"
+
+JBOSS_VERSION="6.0.0.Final"
+RIFTSAW_VERSION="2.3.0-SNAPSHOT"
+AS_HOME="$RIFTSAW_PARENT_DIR/riftsaw-$RIFTSAW_VERSION/jboss-$JBOSS_VERSION"
+AS_CONFIG="default"
+REPLACE_QA_JDBC="true"
+JBOSS_ESB_VERSION="4.9"
+JBOSS_ESB_HOME="$RIFTSAW_PARENT_DIR/riftsaw-$RIFTSAW_VERSION/jbossesb-$JBOSS_ESB_VERSION"
+
+STARTUP_TIME="6"
+TEST_DELAY="40000"
+
+DATABASE=hsql
+
+WS_STACK="native"
+WS_VERSION="3.1.2.GA" # so we don't overwrite the cxf 3.4.1 installed with as6
+WS_STACK_DIR="$RIFTSAW_PARENT_DIR/downloads"
+
+ANT_PROPERTIES="-Driftsaw.parent.dir=$RIFTSAW_PARENT_DIR -Djboss.filename=jboss-as-distribution-${JBOSS_VERSION}.zip -Das.version=6 -Ddatabase=$DATABASE -Dreplace.qa.jdbc=$REPLACE_QA_JDBC -Dorg_jboss_as_home=$AS_HOME -Dorg_jboss_as_config=$AS_CONFIG -Djboss.version=$JBOSS_VERSION -Djbossesb.version=$JBOSS_ESB_VERSION -Dws.stack=$WS_STACK -Dws.version=$WS_VERSION -Dws.stack.dir=$WS_STACK_DIR -Dorg_jboss_esb_home=$JBOSS_ESB_HOME -Ddownload.dir=$DOWNLOAD_DIR -Dstartup.time=$STARTUP_TIME -Dtest.delay=$TEST_DELAY -Dtestesb=false"
+echo ANT_PROPERTIES=${ANT_PROPERTIES}
+
+# build RiftSaw and running unit test
+cd ..
+mvn clean install -Pdocs -Dmaven.repo.local=${WORKSPACE}/m2-repo
+
+# run integration test
+cd qa
+ant $ANT_PROPERTIES stop-server
+ant $ANT_PROPERTIES clean
+ant $ANT_PROPERTIES install.jbossas #was install.jbossesb
+
+# build the RiftSaw and run integration tests
+
+cd ../integration-tests
+mvn $ANT_PROPERTIES clean install -Dmaven.repo.local=${WORKSPACE}/m2-repo
Property changes on: trunk/qa/hudson-riftsaw-jboss-as6.sh
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/runtime/deployer-as6/src/main/java/org/jboss/soa/bpel/deployer/as6/AS6BPELDeployer.java
===================================================================
--- trunk/runtime/deployer-as6/src/main/java/org/jboss/soa/bpel/deployer/as6/AS6BPELDeployer.java 2011-02-07 15:55:03 UTC (rev 1302)
+++ trunk/runtime/deployer-as6/src/main/java/org/jboss/soa/bpel/deployer/as6/AS6BPELDeployer.java 2011-02-09 14:35:00 UTC (rev 1303)
@@ -60,9 +60,6 @@
top = du.getTopLevel();
}
- logger.info("Deploy: "+top.getSimpleName()+" relativePath="+
- du.getRelativePath());
-
VirtualFile root=((VFSDeploymentUnit)du).getRoot();
logger.debug("Deployment descriptor file="+root);
@@ -70,16 +67,6 @@
try {
VirtualFile parent=((VFSDeploymentUnit)du).getRoot().getParent();
- logger.debug("Deployment unit dir="+parent);
-
- // Explore the deployment unit (in place of previous VFSUtils.explode() which no longer exists)
- java.net.URL url=VFSUtils.getPhysicalURL(parent);
- for (VirtualFile vfile : parent.getChildrenRecursively()) {
- VFSUtils.getPhysicalURL(vfile);
- }
-
- logger.debug("Deployment exploded to dir="+root+" URL="+url);
-
long lastModTime=0;
if (top instanceof VFSDeploymentUnit) {
@@ -91,7 +78,25 @@
// TODO: Need to be a more unique name, as it is possible that more
// than one deployment descriptor may exist in the same AS archive
BPELDeploymentUnit unit=new BPELDeploymentUnit(top.getSimpleName(), lastModTime);
+
+ if (m_deploymentUnits.containsKey(unit.getName())) {
+ doUndeploy(du, top);
+ }
+
+
+ logger.info("Deploy: "+top.getSimpleName()+" relativePath="+
+ du.getRelativePath());
+ logger.debug("Deployment unit dir="+parent);
+
+ // Explore the deployment unit (in place of previous VFSUtils.explode() which no longer exists)
+ java.net.URL url=VFSUtils.getPhysicalURL(parent);
+ for (VirtualFile vfile : parent.getChildrenRecursively()) {
+ VFSUtils.getPhysicalURL(vfile);
+ }
+
+ logger.debug("Deployment exploded to dir="+root+" URL="+url);
+
java.io.File ddfile=new java.io.File(url.getFile(), du.getSimpleName()); //BPELDeploymentUnit.BPEL_DEPLOY_XML);
if (ddfile.exists() == false) {
@@ -108,10 +113,10 @@
}
}
}
-
+
} catch (Exception e) {
throw new DeploymentException("Failed to explode deployment unit '"+root+"'", e);
- }
+ }
}
}
@@ -127,40 +132,23 @@
top = du.getTopLevel();
}
- logger.info("Undeploy: "+top.getSimpleName()+" relativePath="+
- du.getRelativePath());
-
try {
BPELDeploymentUnit prev=m_deploymentUnits.get(top.getSimpleName());
+ java.io.File deployFile=new java.io.File(((VFSDeploymentUnit)top).getRoot().asFileURL().getFile());
+
// Undeploy if deployment unit no longer exists on the filesystem, OR
// the last modified time of the cached deployment unit is older than
// the last modified time of the current deployment unit, signifying
// it has been updated and therefore must be undeployed first
+
if (top instanceof VFSDeploymentUnit &&
- (((VFSDeploymentUnit)top).getRoot().exists() == false ||
+ (deployFile.exists() == false ||
(prev != null && prev.getLastModified() <
- ((VFSDeploymentUnit)top).getRoot().getLastModified()))) {
-
- // TODO: Unique name - see deploy
- BPELDeploymentUnit unit=new BPELDeploymentUnit(top.getSimpleName(), 0);
-
- // NOTE: File required to provide path for use in ODE
- // process store impl. When this is replaced, this information
- // will not be required.
- java.io.File ddfile=new java.io.File(((VFSDeploymentUnit)du).getRoot().toURL().getFile());
-
- unit.setDeploymentDescriptor(ddfile);
-
- synchronized(m_deploymentUnits) {
- m_deploymentUnits.remove(unit.getName());
-
- if (m_listener != null) {
- m_listener.undeploy(unit);
- }
- }
+ ((VFSDeploymentUnit)top).getRoot().getLastModified()))) {
+ doUndeploy(du, top);
} else {
- logger.info("Not undeploying BPEL: "+top.getSimpleName()+" relativePath="+
+ logger.debug("Not undeploying BPEL: "+top.getSimpleName()+" relativePath="+
du.getRelativePath());
}
} catch(Exception e) {
@@ -168,7 +156,31 @@
}
}
}
+
+ private void doUndeploy(DeploymentUnit du, DeploymentUnit top) throws Exception {
+
+ logger.info("Undeploy: "+top.getSimpleName()+" relativePath="+
+ du.getRelativePath());
+
+ // TODO: Unique name - see deploy
+ BPELDeploymentUnit unit=new BPELDeploymentUnit(top.getSimpleName(), 0);
+
+ // NOTE: File required to provide path for use in ODE
+ // process store impl. When this is replaced, this information
+ // will not be required.
+ java.io.File ddfile=new java.io.File(((VFSDeploymentUnit)du).getRoot().toURL().getFile());
+
+ unit.setDeploymentDescriptor(ddfile);
+ synchronized(m_deploymentUnits) {
+ m_deploymentUnits.remove(unit.getName());
+
+ if (m_listener != null) {
+ m_listener.undeploy(unit);
+ }
+ }
+ }
+
/**
* This method sets the deployment listener that will be
* informed when BPEL deployment units are detected.