Author: objectiser
Date: 2010-06-18 11:28:38 -0400 (Fri, 18 Jun 2010)
New Revision: 760
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELLoanApprovalTestCase.java
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/build.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/deployment.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/jbm-queue-service.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/jboss-esb.xml
Modified:
trunk/integration-tests/build.xml
trunk/integration-tests/pom.xml
Log:
Added missing integration test for invoking normal loan approval request, to accompany the
loan fault integration test.
Modified: trunk/integration-tests/build.xml
===================================================================
--- trunk/integration-tests/build.xml 2010-06-18 13:56:11 UTC (rev 759)
+++ trunk/integration-tests/build.xml 2010-06-18 15:28:38 UTC (rev 760)
@@ -140,6 +140,7 @@
<ant
antfile="src/test/resources/samples/Quickstart_esb_bpel_hello_world/build.xml"
/>
<ant
antfile="src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/build.xml"
/>
<ant
antfile="src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/build.xml"
/>
+ <ant
antfile="src/test/resources/samples/Quickstart_esb_bpel_loan_approval/build.xml"
/>
<ant
antfile="src/test/resources/samples/Quickstart_esb_bpel_loan_fault/build.xml"
/>
<ant antfile="src/test/resources/samples/Tutorial_bpel_atm/build.xml"
/>
Modified: trunk/integration-tests/pom.xml
===================================================================
--- trunk/integration-tests/pom.xml 2010-06-18 13:56:11 UTC (rev 759)
+++ trunk/integration-tests/pom.xml 2010-06-18 15:28:38 UTC (rev 760)
@@ -553,8 +553,13 @@
</systemProperties>
<testFailureIgnore>true</testFailureIgnore>
<includes>
+ <include>org/jboss/soa/bpel/tests/samples/QuickstartESBBPELLoanApprovalTestCase.java</include>
+ <!--
+ <include>org/jboss/soa/bpel/tests/samples/QuickstartESBBPELLoanFaultTestCase.java</include>
+ <include>org/jboss/soa/bpel/tests/samples/QuickstartESBBPELHelloWorldTestCase.java</include>
<include>**/*TestCase.java</include>
<include>**/*Test.java</include>
+ -->
</includes>
<!--
https://jira.jboss.org/jira/browse/RIFTSAW-34 -->
<excludes>
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELLoanApprovalTestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELLoanApprovalTestCase.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELLoanApprovalTestCase.java 2010-06-18
15:28:38 UTC (rev 760)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, 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.soa.bpel.tests.samples;
+
+import org.jboss.soa.bpel.tests.RiftSawTest;
+import org.jboss.soa.bpel.tests.RiftSawTestSetup;
+
+import junit.framework.Test;
+
+/**
+ * Test case for running the Quickstart_bpel_loan_approval sample from an ESB service.
+ */
+public class QuickstartESBBPELLoanApprovalTestCase extends RiftSawTest {
+
+ private static final String TEST_NAME = "Quickstart_esb_bpel_loan_approval";
+
+ public QuickstartESBBPELLoanApprovalTestCase() {
+ super(TEST_NAME);
+ }
+
+ public static Test suite() {
+ return(new RiftSawTestSetup(QuickstartESBBPELLoanApprovalTestCase.class,
+ TEST_NAME,
"Quickstart_esb_bpel_loan_approval.esb,../Quickstart_bpel_loan_approval/Quickstart_bpel_loan_approval-1.jar,../Quickstart_bpel_loan_approval/Quickstart_bpel_loan_approval.war"));
+ }
+
+ public void testSendHello() throws Exception {
+ String
result=sendESBMessage("<request><firstName>Fred</firstName><name>Bloggs</name><amount>1000</amount></request>",
+ "LoanApprovalBPELESB", "LoanApproval");
+
+ if (result == null || result.contains("<accept>yes</accept>") ==
false) {
+ fail("Invalid result");
+ }
+ }
+}
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/build.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/build.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/build.xml 2010-06-18
15:28:38 UTC (rev 760)
@@ -0,0 +1,28 @@
+<project name="Quickstart_esb_bpel_loan_approval" default="deploy"
basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <property name="deploy.dir" value="${basedir}/target/tests"/>
+ <property name="test.dir"
value="${basedir}/src/test/resources/samples/${ant.project.name}" />
+
+ <property name="sample.esb.name" value="${ant.project.name}.esb"
/>
+
+ <target name="deploy">
+ <echo>Deploy ${ant.project.name}</echo>
+ <mkdir dir="${deploy.dir}/${ant.project.name}" />
+ <zip destfile="${deploy.dir}/${ant.project.name}/${sample.esb.name}">
+ <zipfileset dir="${test.dir}" includes="deployment.xml"
fullpath="META-INF/deployment.xml"/>
+ <zipfileset dir="${test.dir}" includes="jboss-esb.xml"
fullpath="META-INF/jboss-esb.xml"/>
+ <zipfileset dir="${test.dir}" includes="jbm-queue-service.xml"
fullpath="jbm-queue-service.xml"/>
+ </zip>
+ </target>
+
+ <target name="undeploy">
+ <echo>Undeploy ${ant.project.name}</echo>
+ <delete file="${deploy.dir}/${sample.jar.name}" />
+ </target>
+
+</project>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/deployment.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/deployment.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/deployment.xml 2010-06-18
15:28:38 UTC (rev 760)
@@ -0,0 +1,6 @@
+<jbossesb-deployment>
+ <depends>jboss.bpel:service=BPELEngine</depends>
+
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_loan_approval_Request_esb</depends>
+
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_loan_approval_Request_esb_reply</depends>
+
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_loan_approval_Request_gw</depends>
+</jbossesb-deployment>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/jbm-queue-service.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/jbm-queue-service.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/jbm-queue-service.xml 2010-06-18
15:28:38 UTC (rev 760)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_loan_approval_Request_esb"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_loan_approval_Request_esb_reply"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_loan_approval_Request_gw"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+</server>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/jboss-esb.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/jboss-esb.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_loan_approval/jboss-esb.xml 2010-06-18
15:28:38 UTC (rev 760)
@@ -0,0 +1,51 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc...
parameterReloadSecs="5">
+
+ <providers>
+ <jms-provider name="JBossMQ"
connection-factory="ConnectionFactory">
+ <jms-bus busid="quickstartGwChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+
dest-name="queue/quickstart_bpel_loan_approval_Request_gw"
+ />
+ </jms-bus>
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+
dest-name="queue/quickstart_bpel_loan_approval_Request_esb"
+ />
+ </jms-bus>
+
+ </jms-provider>
+ </providers>
+
+ <services>
+ <service
+ category="LoanApprovalBPELESB"
+ name="LoanApproval"
+ description="Successful loan approval">
+ <listeners>
+ <jms-listener name="JMS-Gateway"
+ busidref="quickstartGwChannel"
+ is-gateway="true" />
+ <jms-listener name="loanApproval"
+ busidref="quickstartEsbChannel" />
+ </listeners>
+ <actions>
+ <action name="action1"
class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="printfull"
value="true"/>
+ </action>
+ <action name="action2"
class="org.jboss.soa.esb.actions.bpel.BPELInvoke">
+ <property name="service"
value="{http://example.com/loan-approval/wsdl/}loanService"/>
+ <property name="operation" value="request"
/>
+ <property name="abortOnFault" value="true" />
+ </action>
+ <action name="action3"
class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="printfull"
value="true"/>
+ </action>
+ <!-- The next action is for Continuous Integration testing -->
+ <action name="testStore"
class="org.jboss.soa.esb.actions.TestMessageStore"/>
+ </actions>
+ </service>
+ </services>
+</jbossesb>