You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by ad...@apache.org on 2006/02/28 17:05:47 UTC

svn commit: r381686 [39/40] - in /incubator/ode/scratch/bpe: ./ bpelTests/ bpelTests/probeService/ bpelTests/test1/ bpelTests/test10/ bpelTests/test12/ bpelTests/test13/ bpelTests/test14/ bpelTests/test15/ bpelTests/test16/ bpelTests/test17/ bpelTests/...

Added: incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/BPEClientThread.java.keep
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/BPEClientThread.java.keep?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/BPEClientThread.java.keep (added)
+++ incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/BPEClientThread.java.keep Tue Feb 28 08:02:48 2006
@@ -0,0 +1,140 @@
+/*
+ * Created on Jan 23, 2004
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+package com.sybase.bpe.performance;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.regex.Pattern;
+
+import com.sybase.bpe.bped.EventDirector;
+import com.sybase.bpe.event.IResponseMessage;
+import com.sybase.bpe.event.SimpleRequestMessageEvent;
+import com.sybase.bpe.interaction.InteractionFactory;
+import com.sybase.bpe.util.BPException;
+
+/**
+ * @author charper
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class BPEClientThread extends Thread {
+
+	private static Logger logger =
+		Logger.getLogger(BPEClientThread.class.getName());
+		
+	private static InteractionFactory interactionfactory =
+		InteractionFactory.newInstance();
+
+	private ThreadCounter tcw;
+	private EventDirector ed;
+	private int numMsgs;
+	private SimpleRequestMessageEvent[] msgs;
+	private String uniquePart;
+	private ArrayList partNames;
+	private String[] responses;
+
+	public BPEClientThread(
+		EventDirector ed,
+		int numMsgs,
+		SimpleRequestMessageEvent[] msgs,
+		ThreadCounter tcw, String uniquePart, ArrayList partNames) {
+		this.ed = ed;
+		this.numMsgs = numMsgs;
+		this.msgs = msgs;
+		this.tcw = tcw;
+		this.uniquePart = uniquePart;
+		this.partNames = partNames;
+	}
+	
+	public BPEClientThread(
+			EventDirector ed,
+			int numMsgs,
+			SimpleRequestMessageEvent[] msgs,
+			ThreadCounter tcw, String uniquePart, ArrayList partNames,
+			String[] responses) {
+		this(ed,numMsgs,msgs,tcw,uniquePart,partNames);
+		this.responses = responses;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Runnable#run()
+	 */
+	public void run() {
+
+		// let the thread counter know this thread is started
+		tcw.increment();
+
+		// send the specified number of message groups
+		for (int i = 0; i < numMsgs; i++) {
+			
+			//send each message
+			SimpleRequestMessageEvent[] msgsToSend = 
+				new SimpleRequestMessageEvent[msgs.length];
+			String uniqueNumber = tcw.getUniqueNumber();
+			for ( int j = 0; j < msgs.length; j++ ) {
+				if ( uniquePart != null ) {
+				
+					msgsToSend[j]=buildUniquePart(msgs[j],uniqueNumber);
+				} else {
+					msgsToSend[j]=msgs[j];
+				}
+			}
+			
+			for ( int j = 0; j < msgs.length; j++ ) {
+				//send the event syncronously
+				try {
+					IResponseMessage rsp = ed.sendEvent(msgsToSend[j], true);
+					if ( responses != null ) {
+						if ( ! Pattern.compile(responses[j],Pattern.DOTALL).matcher(rsp.toString()).matches()) {
+							System.err.println("Test " + this.getName() +" Response:");
+							System.err.println(responses.toString());
+							System.err.println("Matching RegEx for " + this.getName() +" Response:");
+							System.err.println(responses[j]);
+							tcw.setFaulted();
+							tcw.decrement();
+							return;
+						}
+					}
+				} catch (BPException e) {
+					logger.log(Level.SEVERE,"",e);
+				}
+			}
+		}
+
+		// let the thread counter know this thread is finished
+		tcw.decrement();
+
+	}
+	
+	private SimpleRequestMessageEvent buildUniquePart(SimpleRequestMessageEvent msg,
+		String uniqueNumber){
+		SimpleRequestMessageEvent newMsg = new SimpleRequestMessageEvent();
+		try {
+			// set the key
+			newMsg.setStaticKey(msg.getStaticKey());
+			
+			Iterator it = partNames.iterator();
+			while ( it.hasNext() ) {
+				String partName = (String)it.next();
+				if ( partName.compareTo(uniquePart) == 0 ) {
+					newMsg.setPart(partName,
+						interactionfactory.createObjectInteraction(uniqueNumber));
+				} else {
+					newMsg.setPart(partName,msg.getPart(partName));
+				}
+			}
+		
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return newMsg;
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/BPELPerformance.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/BPELPerformance.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/BPELPerformance.java (added)
+++ incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/BPELPerformance.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,114 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Jan 23, 2004
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+package com.sybase.bpe.performance;
+
+import com.sybase.bpe.test.BPELTester;
+import com.sybase.bpe.test.CleanUpThread;
+
+/**
+ * @author charper
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class BPELPerformance extends BPELTester {
+
+
+
+	/**
+	 * Constructor for BPELPerformance.
+	 * @param arg0
+	 */
+	public BPELPerformance(String arg0) {
+		super(arg0);
+	}
+
+	/*
+	 * @see TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+		// get the properties
+	}
+
+	/*
+	 * @see TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	public void testBPELPerformance() throws Exception {
+
+		getSystemProps();
+		mySetup();
+		
+		ThreadCounter tcw = new ThreadCounter(threadNumber);
+		long startTime = System.currentTimeMillis();
+		for (int i = 0; i < threadNumber; i++) {
+			// split up the messages
+			int threadNumMessages =  numMessages/threadNumber;
+			if ( i == 0) {
+				threadNumMessages += numMessages%threadNumber;
+			}
+			// create and start a thread
+			BPEClientThread bpect = 
+				new BPEClientThread(eventDirectors[i],threadNumMessages,msgs,
+				tcw,uniquePart,partNames);
+			bpect.start();
+		}
+		// start cleanup if requested
+		CleanUpThread cut = null;
+		if ( cleanUp >=0 ) {
+			cut = new CleanUpThread(cleanUp);
+			cut.start();
+		}
+		tcw.waitForThreadsToFinish();
+		// stop clean up thread
+		if ( cut != null ) {
+			cut.stopCleanUp();
+		}
+		long time = System.currentTimeMillis() - startTime;
+		double timeInSecs = (double)time/(double)1000;
+		double iterationsPerSec = (double)numMessages/((double)time/(double)1000);
+		
+		String longName = testName+"-"+bpelFile+"-"+numMessages+
+			"Messages-"+threadNumber+"Threads(s)";
+			
+		setName(longName);
+		System.out.println(longName + " run complete.\n"+
+					"Iterations = " + numMessages +"\n"+
+					"Total time in milliseconds  = " + time+"\n"+
+					"Total time in seconds = " + timeInSecs +"\n"+
+					"Iterations/second = "+iterationsPerSec+"(expected:"+expected+")");
+					
+		assertTrue(iterationsPerSec > expected);
+
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/ThreadCounter.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/ThreadCounter.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/ThreadCounter.java (added)
+++ incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/ThreadCounter.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,88 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Jan 23, 2004
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+package com.sybase.bpe.performance;
+
+import java.util.logging.Logger;
+
+/**
+ * @author charper
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class ThreadCounter {
+	
+	private static Logger logger = 
+			Logger.getLogger(ThreadCounter.class.getName());
+	
+	private int uniqueNumber;
+	private int count;
+//	private int numThreads;
+	private boolean threadFaulted;
+	
+	public synchronized String getUniqueNumber(){
+		uniqueNumber++;
+		return String.valueOf(uniqueNumber);
+	}
+	
+	public ThreadCounter( int numThreads ) {
+//		this.numThreads = numThreads;
+	}
+	
+	public synchronized void increment () {
+		logger.fine("increment");
+		count++; 
+	}
+	
+	public synchronized void decrement () {
+		logger.fine("decrement");
+		count--; 
+		if ( count <= 0 ) {
+			notifyAll();
+		}
+	}
+	
+	public synchronized void setFaulted() {
+		threadFaulted = true;
+	}
+	
+	public synchronized boolean isFaulted() {
+		return threadFaulted;
+	}
+	
+	
+	public synchronized void waitForThreadsToFinish() {
+		try {
+				logger.fine("waitforThreadsToFinish");
+				wait();
+		} catch (InterruptedException e) {
+			// do nothing
+		}
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/ThreadCounter.java.keep
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/ThreadCounter.java.keep?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/ThreadCounter.java.keep (added)
+++ incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/performance/ThreadCounter.java.keep Tue Feb 28 08:02:48 2006
@@ -0,0 +1,67 @@
+/*
+ * Created on Jan 23, 2004
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+package com.sybase.bpe.performance;
+
+import java.util.logging.Logger;
+
+/**
+ * @author charper
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class ThreadCounter {
+	
+	private static Logger logger = 
+			Logger.getLogger(ThreadCounter.class.getName());
+	
+	private int uniqueNumber;
+	private int count;
+	private int numThreads;
+	private boolean threadFaulted;
+	
+	public synchronized String getUniqueNumber(){
+		uniqueNumber++;
+		return String.valueOf(uniqueNumber);
+	}
+	
+	public ThreadCounter( int numThreads ) {
+		this.numThreads = numThreads;
+	}
+	
+	public synchronized void increment () {
+		logger.fine("increment");
+		count++; 
+	}
+	
+	public synchronized void decrement () {
+		logger.fine("decrement");
+		count--; 
+		if ( count <= 0 ) {
+			notifyAll();
+		}
+	}
+	
+	public synchronized void setFaulted() {
+		threadFaulted = true;
+	}
+	
+	public synchronized boolean isFaulted() {
+		return threadFaulted;
+	}
+	
+	
+	public synchronized void waitForThreadsToFinish() {
+		try {
+				logger.fine("waitforThreadsToFinish");
+				wait();
+		} catch (InterruptedException e) {
+			// do nothing
+		}
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELClientTests.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELClientTests.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELClientTests.java (added)
+++ incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELClientTests.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,256 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+
+package com.sybase.bpe.test;
+
+import java.io.FileInputStream;
+//import java.util.Collection;
+import java.util.Properties;
+import java.util.regex.Pattern;
+
+import com.sybase.bpe.action.bpel.ReceiveAction;
+import com.sybase.bpe.bped.DeployTypeEnum;
+import com.sybase.bpe.bped.EventDirector;
+import com.sybase.bpe.bped.EventDirectorFactory;
+import com.sybase.bpe.bped.IDeployer;
+import com.sybase.bpe.cc.service.CCServiceFactory;
+import com.sybase.bpe.client.exceptions.BPEUserException;
+import com.sybase.bpe.client.result.IResult;
+import com.sybase.bpe.client.util.IBPEInvoker;
+import com.sybase.bpe.client.util.InvokerBuilder;
+
+
+public class BPELClientTests extends BPELTests
+{
+	protected IBPEInvoker[] invokers;
+	
+	public BPELClientTests(String arg0) {
+		super(arg0);
+	}
+	
+	public void mySetup() throws Exception
+	{
+			// is this a remote event director
+			remote = true;
+			if (System.getProperty(JNFI).compareTo(IMJNFI) == 0) {
+				remote = false;
+			}
+			// get the event directors so we can send messages and load definitions
+			eventDirectors = new EventDirector[threadNumber];
+			for (int i = 0; i < threadNumber; i++) {
+
+				if (remote) {
+					// all the engine properties are specified in the app server
+					eventDirectors[i] =
+						EventDirectorFactory.createRemoteEventDirector(pkgName);
+				} else {
+					// all the engine properties are specified in the property files
+					eventDirectors[i] = EventDirectorFactory.createEventDirector();
+				}
+			}
+
+			// we only need to deploy once if the engine is remote
+			if (! noLoad ) {
+				int deploys = remote ? 1 : threadNumber;
+				for (int i = 0; i < deploys; i++) {
+					// get a bpel deployer which we can use to load and delete defintions
+					IDeployer deployer =
+						eventDirectors[i].getDeployer(DeployTypeEnum.BPEL);
+					deployer.loadDefinition(
+							new FileInputStream(bpelFile),
+							false);
+				}
+			}
+			
+			InvokerBuilder invokerBuilder = new InvokerBuilder(pkgName);
+			invokers = invokerBuilder.buildInvokers(msgFiles);
+			
+			// get a hold of a CCService
+			// we need to pass a property to make sure we get the correct
+			// engine state service for the in memory event director, we will have
+			// to modify this if we are going to CC testing with multiple threads
+			// running CC at the same time
+			Properties props = new Properties();
+			props.put(EventDirector.class.getName(),eventDirectors[0]);
+			ccs = CCServiceFactory.newInstance().createCCService(pkgName, props);
+		}
+	
+	protected boolean go(long delay, Object[] oobData)throws Exception 
+	{
+		mySetup();
+		// if there is a delay and the test is in memory
+		// return true becase this is a appserver only test
+		if ( ! remote && delay > 0 ) {
+			System.out.println("Skipping appserver test " + this.getName() + "....");
+			return true;
+		}
+		StringBuffer responses = new StringBuffer();
+		
+		for ( int i=0; i < invokers.length; i++){
+			String resultString = null;
+			try
+			{
+				IBPEInvoker invoker = invokers[i];
+				if ( oobData != null ) {
+					if ( oobData[i] != null ) {
+						Properties props = new Properties();
+						props.put("formatName","atomic");
+						invoker.addPart(ReceiveAction.OOB_DATA,oobData[i],props);
+					}
+				}
+				IResult result = invoker.invoke();
+				resultString = getResultString( result );
+			}
+			catch( BPEUserException e)
+			{
+				resultString = e.toString();
+			}
+	
+			responses.append(resultString);
+			System.out.println(resultString);
+			if ( delay > 0 ) {
+				Thread.sleep(delay);
+			}
+		}
+//		if (responses.toString().matches(expectedResponse)) {
+		if (Pattern.compile(expectedResponse,Pattern.DOTALL).matcher(responses.toString()).matches()) {
+
+			return true;
+		}
+		System.err.println("Test " + this.getName() +" Response:");
+		System.err.println(responses.toString());
+		System.err.println("Matching RegEx for " + this.getName() +" Response:");
+		System.err.println(expectedResponse);
+		
+		return false;
+	}
+
+	public static String getResultString(IResult result)
+	{
+		return result.toString();
+		/*
+		if (result instanceof ISuccessWithResponse)
+		{
+			ISuccessWithResponse swrresult = (ISuccessWithResponse) (result);
+			IBPEMessage rmessage = swrresult.getResponse();
+			StringBuffer buf = new StringBuffer("Fault Message:" + null + "\n");
+			Iterator it = rmessage.getParts().iterator();
+			while (it.hasNext())
+			{
+				IBPEMessagePart part = (IBPEMessagePart) (it.next());
+				String name = part.getName();
+				try
+				{
+					buf.append("Part \""
+							+ name
+							+ "\" value: "
+							+ rmessage.getPart(name).getFormattableValue()
+									.toString() + "\n");
+				} catch (Exception e)
+				{
+					buf.append("Part \"" + name + "\" value: "
+							+ e.getLocalizedMessage());
+				}
+			}
+			
+			return buf.toString();
+		}
+		return "" + null;
+		*/
+	}
+	
+	public void testTestThrowFaultOutsideOfBP() throws Exception {
+		bpelFile = bpelTestsDir+"testThrowFaultOutsideOfBP/bpelTestThrowFaultOutsideOfBP.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testThrowFaultOutsideOfBP/datatfo_1.txt"};
+		expectedResponse = ".*urn:sybase:bpel:testFault.*FaultMessage1.*errorID.*FA-1.*errorText.*fault text one.*";
+		assertTrue(go(0, null));
+		/*
+		<FaultResult>
+	    <FaultNamespace>urn:sybase:bpel:testFault</FaultNamespace>
+	    <FaultName>FaultMessage1</FaultName>
+	    <Message>
+	        <Part name="errorID">FA-1</Part>
+	        <Part name="errorText">fault text one</Part>
+	    </Message>
+	</FaultResult>
+	*/
+	}
+	
+	public void testBadPortType() throws Exception {
+		bpelFile = bpelTestsDir+"testThrowFaultOutsideOfBP/bpelTestThrowFaultOutsideOfBP.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testBadPortType/dataBadPortType.txt"};
+		expectedResponse = ".*SystemException.*";
+		assertTrue(go(0, null));
+		/*
+		<FaultResult>
+	    <FaultNamespace>urn:sybase:bpel:testFault</FaultNamespace>
+	    <FaultName>FaultMessage1</FaultName>
+	    <Message>
+	        <Part name="errorID">FA-1</Part>
+	        <Part name="errorText">fault text one</Part>
+	    </Message>
+	</FaultResult>
+	*/
+	}
+	
+	public void testFaultCompHandlerInInvoke() throws Exception {
+		bpelFile = bpelTestsDir+"testFaultCompHandlerInInvoke/bpelTestFaultCompHandlerInInvoke.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testFaultCompHandlerInInvoke/data.txt"};
+		expectedResponse = ".*faultFromCompensationHandlerInInvoke.*";
+/*
+    <FaultNamespace>urn:sybase:bpel:faultCompHandlerInInvokeProcessing</FaultNamespace>
+    <FaultName>faultFromCompensationHandlerInInvoke</FaultName>
+    </FaultResult>
+*/
+		assertTrue(go(0, null));
+	}
+	
+	public void testReplyWithFault() throws Exception {
+		bpelFile = bpelTestsDir+"testReplyWithFault/bpelTestReplyWithFault.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testReplyWithFault/dataReplyWithFault.txt"};
+		expectedResponse = ".*urn:sybase:bpel:testReplyWithFault.*testFault.*faultID.*fault text one.*faultText.*Event Start Test ReplyWithFault -> caught FaultMessage -> fault text one.*";
+			/*
+			<FaultResult>
+		    <FaultNamespace>urn:sybase:bpel:testReplyWithFault</FaultNamespace>
+		    <FaultName>testFault</FaultName>
+		    <Message>
+		        <Part name="faultID">fault text one</Part>
+		        <Part name="faultText">Event Start Test ReplyWithFault -> caught FaultMessage -> fault text one</Part>
+		    </Message>
+		    </FaultResult>
+		    */
+		assertTrue(go(0, null));
+	}
+	
+	
+	public void testLoopedCompensation() throws Exception {
+		bpelFile = bpelTestsDir+"testLoopedCompensation/bpelTestLoopedCompensation.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testLoopedCompensation/data1.txt"};
+		expectedResponse = ".*Scope \"ScopOne\" does not exist.*";
+		assertTrue(go(0, null));
+	}
+}

Added: incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELTester.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELTester.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELTester.java (added)
+++ incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELTester.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,302 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Jan 23, 2004
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+package com.sybase.bpe.test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.ArrayList;
+//import java.util.Collection;
+import java.util.Properties;
+import java.util.regex.Pattern;
+
+import junit.framework.TestCase;
+
+import com.sybase.bpe.action.bpel.ReceiveAction;
+import com.sybase.bpe.bped.DeployTypeEnum;
+import com.sybase.bpe.bped.EventDirector;
+import com.sybase.bpe.bped.EventDirectorFactory;
+import com.sybase.bpe.bped.IDeployer;
+import com.sybase.bpe.cc.service.CCServiceFactory;
+import com.sybase.bpe.cc.service.ICCService;
+import com.sybase.bpe.client.DescribedValue;
+import com.sybase.bpe.client.formats.INativeFormat;
+import com.sybase.bpe.client.spi.interaction.ISPIInteraction;
+import com.sybase.bpe.event.BPELStaticKey;
+import com.sybase.bpe.event.IResponseMessage;
+import com.sybase.bpe.event.SimpleRequestMessageEvent;
+import com.sybase.bpe.interaction.IInteraction;
+import com.sybase.bpe.interaction.InteractionFactory;
+import com.sybase.bpe.interaction.spiadapter.SPIAdapterInteraction;
+import com.sybase.bpe.interaction.spiimpl.MasterInteractionFactory;
+
+/**
+ * @author charper
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class BPELTester extends TestCase {
+
+	public static final String BPEL_TESTS_DIR = "BPEL_TESTS_DIR";
+	public static final String BPEL = "BPEL";
+	public static final String PKGNAME = "PKGNAME";
+	public static final String MSGS = "MSGS";
+	public static final String OUTPUT = "OUTPUT";
+	public static final String TESTNAME = "TESTNAME";
+	public static final String THREADS = "THREADS";
+	public static final String NUMMSGS = "NUMMSGS";
+	public static final String EXPECTED = "EXPECTED";
+	public static final String JNFI = "java.naming.factory.initial";
+	public static final String IMJNFI =
+		"com.sybase.bpe.inmemory.jndi.IMContextFactory";
+	public static final String UNIQUE = "UNIQUE";
+	public static final String NOLOAD = "NOLOAD";
+	public static final String CLEANUP = "CLEANUP";
+
+	private static InteractionFactory interactionfactory =
+		InteractionFactory.newInstance();
+	
+	protected String expectedResponse;
+
+	public String bpelFile;
+	public String[] msgFiles;
+	public String outPutFile;
+	public int threadNumber;
+	public String testName;
+	public int numMessages;
+	public int expected;
+	public EventDirector[] eventDirectors;
+	public SimpleRequestMessageEvent[] msgs;
+	public String uniquePart;
+	public ArrayList partNames;
+	public boolean noLoad;
+	public int cleanUp = -1;
+	public boolean remote;
+	public ICCService ccs;
+	// default is BPE
+	public String pkgName = "BPE";
+	public String bpelTestsDir = "";
+
+	/**
+	 * Constructor for BPELPerformance.
+	 * @param arg0
+	 */
+	public BPELTester(String arg0) {
+		super(arg0);
+	}
+
+	/*
+	 * @see TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+	}
+
+	public void getSystemProps() {
+
+		//		get the properties
+		if ( System.getProperty(BPEL_TESTS_DIR) != null ){
+			bpelTestsDir = System.getProperty(BPEL_TESTS_DIR)+"/";
+		}
+		if ( System.getProperty(PKGNAME) != null ){
+			pkgName = System.getProperty(PKGNAME);
+		}
+		if ( System.getProperty(BPEL) != null ){
+			bpelFile = System.getProperty(BPEL);
+		}
+		if ( System.getProperty(MSGS) != null ) {
+			msgFiles = System.getProperty(MSGS).split(",");
+		}
+		if ( System.getProperty(OUTPUT) != null ) {
+			outPutFile = System.getProperty(OUTPUT);
+		}
+		if (System.getProperty(NUMMSGS) != null) {
+			numMessages = Integer.parseInt(System.getProperty(NUMMSGS));
+		}
+		if (System.getProperty(THREADS) != null) {
+			threadNumber = Integer.parseInt(System.getProperty(THREADS));
+		}
+		if (System.getProperty(EXPECTED) != null) {
+			expected = Integer.parseInt(System.getProperty(EXPECTED));
+		}
+		if ( System.getProperty(TESTNAME) != null ) {
+			testName = System.getProperty(TESTNAME);
+		}
+		if ( System.getProperty(UNIQUE) != null ) {
+			uniquePart = System.getProperty(UNIQUE);
+		}
+		
+		noLoad = (System.getProperty(NOLOAD) != null) ? true : false;
+		
+		if (System.getProperty(CLEANUP) != null) {
+			cleanUp = Integer.parseInt(System.getProperty(CLEANUP));
+		}
+
+	}
+
+	public void mySetup() throws Exception {
+
+
+		// is this a remote event director
+		remote = true;
+		if (System.getProperty(JNFI).compareTo(IMJNFI) == 0) {
+			remote = false;
+		}
+		// get the event directors so we can send messages and load definitions
+		eventDirectors = new EventDirector[threadNumber];
+		for (int i = 0; i < threadNumber; i++) {
+
+			if (remote) {
+				// all the engine properties are specified in the app server
+				eventDirectors[i] =
+					EventDirectorFactory.createRemoteEventDirector(pkgName);
+			} else {
+				// all the engine properties are specified in the property files
+				eventDirectors[i] = EventDirectorFactory.createEventDirector();
+			}
+		}
+
+		// we only need to deploy once if the engine is remote
+		if (! noLoad ) {
+			int deploys = remote ? 1 : threadNumber;
+			for (int i = 0; i < deploys; i++) {
+				// get a bpel deployer which we can use to load and delete defintions
+				IDeployer deployer =
+					eventDirectors[i].getDeployer(DeployTypeEnum.BPEL);
+				deployer.loadDefinition(
+						new FileInputStream(bpelFile),
+						false);
+			}
+		}
+
+		// create the messages
+		msgs = new SimpleRequestMessageEvent[msgFiles.length];
+		for (int j = 0; j < msgFiles.length; j++) {
+			// each message is passed in a properties file for this utility
+			Properties msg = new Properties();
+			msg.load(new FileInputStream(new File(msgFiles[j])));
+
+			// bpel message are routed based on webservice type information
+			// so we build a key to tack on to our message
+			BPELStaticKey bsk = new BPELStaticKey();
+			bsk.setTargetNamespace(msg.getProperty("target.name.space"));
+			bsk.setPortType(msg.getProperty("port.type"));
+			bsk.setOperation(msg.getProperty("operation"));
+
+			// now create the message
+			msgs[j] = new SimpleRequestMessageEvent();
+			// set the key
+			msgs[j].setStaticKey(bsk);
+
+			//now set the parts of the message, specified as part1, part2, ... in the file
+			int i = 1;
+			partNames = new ArrayList();
+			while (true) {
+				String partName = msg.getProperty("part" + String.valueOf(i++));
+				if (partName == null)
+					break;
+				String[] partSplit = partName.split("\\.");
+				if (partSplit.length < 2) {
+					System.out.println("part name requires a type prefix");
+					break;
+				}
+				IInteraction ior = null;
+				if (partSplit[0].equals("xml")) {
+					ior =
+						interactionfactory.createXMLInteraction(
+							msg.getProperty(partName).getBytes());
+				} else if (partSplit[0].equals("str")) {
+					ior =
+						interactionfactory.createObjectInteraction(
+							msg.getProperty(partName));
+				}
+
+				msgs[j].setPart(partSplit[1], ior);
+				partNames.add(partSplit[1]);
+			}
+		}
+		
+		// get a hold of a CCService
+		// we need to pass a property to make sure we get the correct
+		// engine state service for the in memory event director, we will have
+		// to modify this if we are going to CC testing with multiple threads
+		// running CC at the same time
+		Properties props = new Properties();
+		props.put(EventDirector.class.getName(),eventDirectors[0]);
+		ccs = CCServiceFactory.newInstance().createCCService(pkgName,props);
+
+	}
+
+	/*
+	 * @see TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+	
+	protected boolean go(long delay, Object[] oobData)throws Exception {
+		mySetup();
+		// if there is a delay and the test is in memory
+		// return true becase this is a appserver only test
+		if ( ! remote && delay > 0 ) {
+			System.out.println("Skipping appserver test " + this.getName() + "....");
+			return true;
+		}
+		StringBuffer responses = new StringBuffer();
+		for ( int i=0; i < msgs.length; i++){
+			SimpleRequestMessageEvent msg = msgs[i];
+			if ( oobData != null ) {
+				if ( oobData[i] != null ) {
+					DescribedValue dv = new DescribedValue( oobData[i], INativeFormat.ATOMIC, new Properties() );
+					ISPIInteraction spi = MasterInteractionFactory.newInstance().createInteraction(dv);
+					SPIAdapterInteraction spiai = 
+					    new SPIAdapterInteraction( spi );
+					msg.setPart(ReceiveAction.OOB_DATA, spiai);
+				}
+			}
+			IResponseMessage rsp = eventDirectors[0].sendEvent(msg,true);
+			responses.append(rsp.toString());
+			System.out.println(rsp.toString());
+			if ( delay > 0 ) {
+				Thread.sleep(delay);
+			}
+		}
+//		if (responses.toString().matches(expectedResponse)) {
+		if (Pattern.compile(expectedResponse,Pattern.DOTALL).matcher(responses.toString()).matches()) {
+
+			return true;
+		}
+		System.err.println("Test " + this.getName() +" Response:");
+		System.err.println(responses.toString());
+		System.err.println("Matching RegEx for " + this.getName() +" Response:");
+		System.err.println(expectedResponse);
+		
+		return false;
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELTests.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELTests.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELTests.java (added)
+++ incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELTests.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,664 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Jan 26, 2004
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+package com.sybase.bpe.test;
+
+import java.util.Iterator;
+
+import com.sybase.bpe.cc.client.InstanceState;
+import com.sybase.bpe.cc.data.DefinitionData;
+import com.sybase.bpe.cc.data.InstanceData;
+
+
+/**
+ * @author charper
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class BPELTests extends BPELTester {
+	
+
+
+	/**
+	 * Constructor for BPELTests.
+	 * @param arg0
+	 */
+	public BPELTests(String arg0) {
+		super(arg0);
+	}
+	
+
+	
+	public void testTest1() throws Exception {
+		
+		bpelFile = bpelTestsDir+"test1/bpelTest1.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test1/data1_1.txt",bpelTestsDir+"test1/data1_2.txt",
+				bpelTestsDir+"test1/data1_3.txt",bpelTestsDir+"test1/data1_4.txt",bpelTestsDir+"test1/data1_5.txt",
+				bpelTestsDir+"test1/data1_6.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: test1Process complete\n"+
+"Part \"replyText\" value: Event Start Test1.1 -> root process splits into A and B -> process [AB] completes -> process [AB] completes -> processes A and B merge on process C -> merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: test1Process complete\n"+
+"Part \"replyText\" value: Event Start Test1.2 -> root process splits into A and B -> process [AB] completes -> process [AB] completes -> merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: test1Process complete\n"+
+"Part \"replyText\" value: Event Start Test1.3 -> root process splits into A and B -> process [AB] completes -> process [AB] completes -> merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: test1Process complete\n"+
+"Part \"replyText\" value: Event Start Test1.4 -> root process splits into A and B -> process [AB] completes -> process [AB] completes -> merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: test1Process complete\n"+
+"Part \"replyText\" value: Event Start Test1.5 -> root process splits into A and B -> process [AB] completes -> process [AB] completes -> processes A and B merge on process C -> merge into root process -> test switch statement -> case max: set loop iterations = 10 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10 -> 11 -> test1Process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: test1Process complete\n"+
+"Part \"replyText\" value: Event Start Test1.6 -> root process splits into A and B -> process [AB] completes -> process [AB] completes -> processes A and B merge on process C -> merge into root process -> test switch statement -> otherwise: set loop iterations = 0 -> test loop iterations -> test1Process complete\n";
+
+		assertTrue(go(0, null));	
+	}
+		
+	public void testTest10() throws Exception {
+		bpelFile = bpelTestsDir+"test10/bpelTest10.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test10/data10_1.txt",bpelTestsDir+"test10/data10_3.txt",
+				bpelTestsDir+"test10/data10_4.txt",bpelTestsDir+"test10/data10_2.txt"};
+		expectedResponse=
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test10.1 -> block for next message -> received event on port test10_3PT -> received event on port test10_4PT -> process complete\n";
+		assertTrue(go(0, null));
+	}
+		
+		
+	public void testTest12() throws Exception {
+		bpelFile = bpelTestsDir+"test12/bpelTest12.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test12/data12_1.txt"};
+		expectedResponse = 
+"Fault Message:null\n"+
+"Part \"replyID\" value: Start Test12\n"+
+"Part \"replyText\" value: pass\n";
+		assertTrue(go(0, null));
+	}
+		
+	public void testTest13() throws Exception {
+		bpelFile = bpelTestsDir+"test13/bpelTest13.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test13/data13_1.txt"};
+		expectedResponse ="Fault Message:null\n"+
+"Part \"replyID\" value: Test13\n"+
+"Part \"replyText\" value: pass\n";
+		assertTrue(go(0, null));
+	}
+		
+	public void testTest14() throws Exception {
+		bpelFile = bpelTestsDir+"test14/bpelTest14.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test14/data14_1.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: Test14\n"+
+"Part \"replyText\" value: pass\n";
+		assertTrue(go(0, null));
+	}
+		
+	public void testTest15() throws Exception {
+		bpelFile = bpelTestsDir+"test15/bpelTest15.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test15/data15_1.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: Start Test15\n"+
+"Part \"replyText\" value: pass\n";
+		assertTrue(go(0, null));
+	}
+	
+		
+	public void testTest2() throws Exception {
+		bpelFile = bpelTestsDir+"test2/bpelTest2.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test2/data2_1.txt",bpelTestsDir+"test2/data2_2.txt",
+				bpelTestsDir+"test2/data2_3.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test2.1 -> throw testFault -> caught testFault -> process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: caught fault with catchAll\n"+
+"Part \"replyText\" value: Event Start Test2.2 -> throw unknown fault -> caught fault with catchAll\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test2.3 -> process complete\n";
+		assertTrue(go(0, null));
+	}
+		
+	public void testTest3() throws Exception {
+		bpelFile = bpelTestsDir+"test3/bpelTest3.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test3/data3_1.txt",bpelTestsDir+"test3/data3_2.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test3.1 -> begin fault test -> throw testFault -> caught testFault -> process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test3.2 -> begin fault test -> throw unknown fault -> process complete\n";
+		assertTrue(go(0, null));
+	}
+
+				
+	public void testTest5() throws Exception {
+		bpelFile = bpelTestsDir+"test5/bpelTest5.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test5/data5_1_1.txt",bpelTestsDir+"test5/data5_1_2.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test5.1 -> loop on receive until message includes requestEnd = yes -> received message -> process complete\n";
+		assertTrue(go(0, null));
+	}
+		
+	public void testTest6() throws Exception {
+		bpelFile = bpelTestsDir+"test6/bpelTest6.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test6/data6_1.txt",bpelTestsDir+"test6/data6_2.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test6.1 -> pick branch one invoked -> process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test6.2 -> pick branch two invoked -> process complete\n";
+		assertTrue(go(0, null));
+	}
+
+	public void testTest7() throws Exception {
+		bpelFile = bpelTestsDir+"test7/bpelTest7.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test7/data7_1.txt",bpelTestsDir+"test7/data7_3.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test7.1 -> block for next message -> pick branch two invoked -> process complete\n";
+		assertTrue(go(0, null));
+	}
+
+	
+	public void testTest8() throws Exception {
+		bpelFile = bpelTestsDir+"test8/bpelTest8.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test8/data8_1.txt",bpelTestsDir+"test8/data8_3.txt",
+				bpelTestsDir+"test8/data8_4.txt",bpelTestsDir+"test8/data8_2.txt",bpelTestsDir+"test8/data8_2.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test8.1 -> block for next message -> received event on port test8_3PT -> received event on port test8_4PT -> block for next message -> process complete\n";
+		assertTrue(go(0, null));
+	}
+
+	public void testTest9() throws Exception {
+		bpelFile = bpelTestsDir+"test9/bpelTest9.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test9/data9_1.txt",bpelTestsDir+"test9/data9_2_1.txt",
+				bpelTestsDir+"test9/data9_2_2.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test9.1 -> loop on pick until message includes requestEnd = yes -> pick branch one invoked -> pick branch two invoked -> process complete\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testTest16() throws Exception {
+		bpelFile = bpelTestsDir+"test16/bpelTest16.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test16/data16_1.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n" +
+"Part \"replyText\" value: Event Start Test16.1 -> caught uninitializedVariable -> process complete\n";
+
+		
+		assertTrue(go(0, null));
+	}
+	
+	public void testTest17() throws Exception {
+		bpelFile = bpelTestsDir+"test17/bpelTest17.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test17/data17_1.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test17.1 -> caught FaultMessage -> fault text one -> process complete\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testTestBPChain() throws Exception {
+		bpelFile = bpelTestsDir+"testBPChain/bpelTestBPChain.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testBPChain/data1_1.txt"};
+		expectedResponse = "Fault Message:null.*response1.*some reply text.*";
+/*"Fault Message:null\n"+
+"Part \"responses\" value: <.xml version=\"1.0\" encoding=\"UTF-8\".>\n"+
+"<response1>response1</response1>\n"+
+"Part \"replyID\" value: a reply ID\n"+
+"Part \"replyText\" value: some reply text\n";*/
+		
+		assertTrue(go(0, null));
+	}
+	
+/*	public void testTimer1() throws Exception {
+		bpelFile = "testTimer1/bpelTestTimer1.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testTimer1/timer1Data.txt","testTimer1/timer1Data.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyText\" value: PT3SPT7S\n";
+		assertTrue(go(30000));
+	}
+	
+	public void testTimer2() throws Exception {
+		bpelFile = "testTimer2/bpelTestTimer2.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testTimer2/timer2Data.txt","testTimer2/timer2Data.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyText\" value: TESTPT7S\n";
+		assertTrue(go(20000));
+	}
+	
+	public void testTimer3() throws Exception {
+		bpelFile = "testTimer3/bpelTestTimer3.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testTimer3/timer3Data.txt"};
+		expectedResponse =
+"Fault Message:null\n";
+		assertTrue(go(1000));
+	}*/
+	
+	public void testTerminate() throws Exception {
+		bpelFile = bpelTestsDir+"testTerminate/bpelTestTerminate.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testTerminate/terminate1Data.txt"};
+		expectedResponse =
+"Fault Message:null\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testTerminateTest5() throws Exception {
+		bpelFile = bpelTestsDir+"test5/bpelTest5.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"test5/data5_1_1.txt"}; //,"test5/data5_1_2.txt"};
+		expectedResponse =
+"Fault Message:null\n";//+
+//"Fault Message:null\n"+
+//"Part \"replyID\" value: process complete\n"+
+//"Part \"replyText\" value: Event Start Test5.1 -> loop on receive until message includes requestEnd = yes -> received message -> process complete\n";
+		//assertTrue(
+		go(0, null);//);
+		
+		Iterator it = ccs.getDefinitionData().iterator();
+		while ( it.hasNext() ) {
+			DefinitionData dd = (DefinitionData)it.next();
+			if ( dd.getName().equals("test5Process")) {
+				Iterator it2 = ccs.getInstancesData(dd.getID()).iterator();
+				while ( it2.hasNext() ) {
+					InstanceData id = (InstanceData)it2.next();
+					ccs.terminateInstance(id);
+				}
+				break;
+			}
+		}
+		
+		// look for the process agian
+		it = ccs.getDefinitionData().iterator();
+		while ( it.hasNext() ) {
+			DefinitionData dd = (DefinitionData)it.next();
+			if ( dd.getName().equals("test5Process")) {
+				Iterator it2 = ccs.getInstancesData(dd.getID()).iterator();
+				while ( it2.hasNext() ) {
+					InstanceData id = (InstanceData)it2.next();
+					if ( ! id.getState().toString().equals(InstanceState.FINISHED.toString()) ) {
+						assertTrue(false);
+						return;
+					}
+				}
+			}
+		}
+		assertTrue(true);
+	}
+	
+	 
+	
+	public void testScopedCorrelationSets() throws Exception {
+		bpelFile = bpelTestsDir+"testScopedCorrelationSets/bpelTestScopedCorrelationSets.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testScopedCorrelationSets/data1.txt",
+				bpelTestsDir+"testScopedCorrelationSets/data2.txt",bpelTestsDir+"testScopedCorrelationSets/data3.txt"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Fault Message:null\n"+
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: corrl2\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testCatchForcedTermination() throws Exception {
+		bpelFile = bpelTestsDir+"testCatchForcedTerminate/bpelTestCatchForcedTerminate.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testCatchForcedTerminate/data1.txt",
+				bpelTestsDir+"testCatchForcedTerminate/data3.txt"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: forcedTermination\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testFaultInCompensationHandler() throws Exception {
+		bpelFile = bpelTestsDir+"testFaultInCompensationHandler/bpelTestFaultInCompensationHandler.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testFaultInCompensationHandler/data1.txt",
+				bpelTestsDir+"testFaultInCompensationHandler/data3.txt"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: msg1\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testFaultInFaultHandler() throws Exception {
+		bpelFile = bpelTestsDir+"testFaultInFaultHandler/bpelTestFaultInFaultHandler.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testFaultInFaultHandler/data1.txt"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: ScopeOneTwoFaultHandler -> RootScopeFaultHandler\n";
+		assertTrue(go(0, null));
+	}
+	
+/*	public void testTimerOnAlarmAtRootScope() throws Exception {
+		bpelFile = "testTimerOnAlarmAtRootScope/bpelTestTimerOnAlarmAtRootScope.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testTimerOnAlarmAtRootScope/timer1Data.txt","testTimerOnAlarmAtRootScope/timer1Data.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyText\" value: PT3SPT7S\n";
+		assertTrue(go(30000));
+	}*/
+	
+	public void testOOBData() throws Exception {
+		bpelFile = bpelTestsDir+"testOOBData/bpelTestOOBData.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testOOBData/oOBData.txt",bpelTestsDir+"testOOBData/oOBData2.txt"};
+		Object[] oobData = new Object[] {"junk",null};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: junk\n";
+		assertTrue(go(0, oobData));
+	}
+	
+	public void testNSDeploy() throws Exception {
+		bpelFile = bpelTestsDir+"testNSDeploy/bpelTestNSDeploy.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testNSDeploy/nSDeploy.txt"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: PT7S\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testLocalInvoke() throws Exception {
+		bpelFile = bpelTestsDir+"testLocalInvoke/bpelTestLocalInvoke.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testLocalInvoke/localInvoke1.txt"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: test\n";
+		assertTrue(go(0, null));
+	}
+
+	public void testLinkInSwitch() throws Exception {
+		bpelFile = bpelTestsDir+"testLinkInSwitch/bpelTestLinkInSwitch.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testLinkInSwitch/dataLIS_1.txt",bpelTestsDir+"testLinkInSwitch/dataLIS_2.txt",
+				bpelTestsDir+"testLinkInSwitch/dataLIS_3.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: testLinkInSwitch complete\n"+
+"Part \"replyText\" value: Start TestLIS.1 -> case1 -> test switch link -> switch-case1 -> known-message -> testLinkInSwitch complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: testLinkInSwitch complete\n"+
+"Part \"replyText\" value: Start TestLIS.2 -> case2 -> test switch link -> switch-case2 -> known-message -> testLinkInSwitch complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: testLinkInSwitch complete\n"+
+"Part \"replyText\" value: Start TestLIS.3 -> otherwise -> test switch link -> switch-otherwise -> unknown-message -> testLinkInSwitch complete\n";
+		assertTrue(go(0, null));
+	}	
+	
+	public void testQts377278() throws Exception {
+		bpelFile = bpelTestsDir+"testQts377278/bpelTestQts377278.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testQts377278/data.txt"};
+		expectedResponse =
+			"Fault Message:null\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testPartnerLinkAssign() throws Exception {
+		bpelFile = bpelTestsDir+"testPartnerLinkAssign/bpelTestPartnerLinkAssign.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testPartnerLinkAssign/data.txt"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: partnerLinkDataInpartnerLinkDataOut\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testNestedSplits() throws Exception {
+		bpelFile = bpelTestsDir+"testNestedSplits/bpelTestNestedSplits.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testNestedSplits/links.props"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Part \"InParam\" value: franklin\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testReplyWithFault() throws Exception {
+		bpelFile = bpelTestsDir+"testReplyWithFault/bpelTestReplyWithFault.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testReplyWithFault/dataReplyWithFault.txt"};
+		expectedResponse =
+"Fault Message:Fault Actor:null Fault Code:null Fault String:testFault\n"+
+"FaultPart \"faultID\" value: fault text one\n"+
+"FaultPart \"faultText\" value: Event Start Test ReplyWithFault -> caught FaultMessage -> fault text one\n\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testCorrlCmplx() throws Exception {
+		bpelFile = bpelTestsDir+"testCorrlCmplx/bpelTestCorrlCmplx.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testCorrlCmplx/msg1.txt",
+				bpelTestsDir+"testCorrlCmplx/msg2.txt",
+				bpelTestsDir+"testCorrlCmplx/msg3.txt"};
+		expectedResponse = 
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"newParameter2\" value: cory\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testCorrlInvokeReply() throws Exception {
+		bpelFile = bpelTestsDir+"testCorrlInvokeReply/bpelTestCorrlInvokeReply.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testCorrlInvokeReply/msg1.txt",
+				bpelTestsDir+"testCorrlInvokeReply/msg2.txt",
+				bpelTestsDir+"testCorrlInvokeReply/msg3.txt",
+				bpelTestsDir+"testCorrlInvokeReply/msg4.txt"};
+		expectedResponse = ".*xml.*jayme.*cory.*heading.*body.*cory.*testinvoke.*jayme.*";
+//"Fault Message:null\n"+
+//"Part \"newParameter2\" value: <?xml version=\"1.0\" encoding=\"UTF-8\"?><tns1:note xmlns:tns=\"urn:mycompany:/corrlcr/invokereplycorrls\" xmlns:tns1=\"http://www.w3schools.com\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><tns1:to>jayme</tns1:to><tns1:from>cory</tns1:from><tns1:heading>heading</tns1:heading><tns1:body>body</tns1:body></tns1:note>\n"+
+//"Fault Message:null\n"+
+//"Part \"newParameter2\" value: cory\n"+
+//"Fault Message:null\n"+
+//"Part \"newParameter2\" value: testinvoke\n"+
+//"Fault Message:null\n"+
+//"Part \"newParameter2\" value: jayme";
+		assertTrue(go(0, null));
+	}
+	
+	public void testGraftGraftChildren() throws Exception {
+		bpelFile = bpelTestsDir+"testGraftGraftChildren/bpelTestGraftGraftChildren.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testGraftGraftChildren/msg1.txt"};
+		expectedResponse = ".*Sombrero.*Slippers.*";
+		assertTrue(go(0, null));
+	}
+	
+	public void testLoopedCompensation2() throws Exception {
+		bpelFile = bpelTestsDir+"testLoopedCompensation2/bpelTestLoopedCompensation2.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testLoopedCompensation2/msg1.txt"};
+		expectedResponse = ".*AppendVar:01234567899876543210.*";
+		assertTrue(go(0, null));
+	}
+	
+	public void testBuildDocWithNestedNS() throws Exception {
+		bpelFile = bpelTestsDir+"testBuildDocWithNestedNS/bpelTestBuildDocWithNestedNS.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testBuildDocWithNestedNS/company.txt"};
+		expectedResponse = ".*<ns0:Company xmlns:ns0=\"http://www.company.org\" xmlns:ns1=\"http://www.person.org\" xmlns:ns2=\"http://www.product.org\"><ns0:Person><ns1:Name>John Doe</ns1:Name><ns1:SSN>123-45-6789</ns1:SSN></ns0:Person><ns0:Product><ns2:Type>Widget</ns2:Type></ns0:Product></ns0:Company>.*";
+		assertTrue(go(0, null));
+	}
+	
+	public void testSingleRuleInCompHandler() throws Exception {
+		bpelFile = bpelTestsDir+"testSingleRuleInCompHandler/bpelTestSingleRuleInCompHandler.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testSingleRuleInCompHandler/msg1.txt"};
+		expectedResponse = ".*true.*";
+		assertTrue(go(0, null));
+	}
+	
+	public void testCatchAllNonBPError1() throws Exception {
+		bpelFile = bpelTestsDir+"testCatchAllNonBPError/bpelTestCatchAllNonBPError.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testCatchAllNonBPError/msg1.txt"};
+		expectedResponse = ".*catchAll.*";
+		assertTrue(go(0, null));
+	}
+	
+	public void testCatchAllNonBPError2() throws Exception {
+		bpelFile = bpelTestsDir+"testCatchAllNonBPError/bpelTestCatchAllNonBPError.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testCatchAllNonBPError/msg2.txt"};
+		expectedResponse = ".*catchAll.*";
+		assertTrue(go(0, null));
+	}
+	
+	public void testCatchAllNonBPError3() throws Exception {
+		bpelFile = bpelTestsDir+"testCatchAllNonBPError/bpelTestCatchAllNonBPError.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testCatchAllNonBPError/msg3.txt"};
+		expectedResponse = ".*catchAll.*";
+		assertTrue(go(0, null));
+	}
+	
+	public void testCatchFaultInFaultHandler() throws Exception {
+		bpelFile = bpelTestsDir+"testCatchFaultInFaultHandler/bpelTestCatchFaultInFaultHandler.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testCatchFaultInFaultHandler/msg.txt"};
+		expectedResponse = ".*>works<.*";
+		assertTrue(go(0,null));
+	}
+	
+	public void testCatchFaultInFaultHandler2() throws Exception {
+		bpelFile = bpelTestsDir+"testCatchFaultInFaultHandler2/bpelTestCatchFaultInFaultHandler2.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testCatchFaultInFaultHandler2/msg.txt"};
+		expectedResponse = ".*>works<.*";
+		assertTrue(go(0,null));
+	}
+	
+	public void testThrowInScopeInFaultHandler() throws Exception {
+		bpelFile = bpelTestsDir+"testThrowInScopeInFaultHandler/bpelTestThrowInScopeInFaultHandler.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testThrowInScopeInFaultHandler/msg.txt" };
+		expectedResponse = ".*>doesn&amp;apos;t work<.*";
+		assertTrue(go(0,null));
+	}
+	
+	public void testThrowInScopeInFaultHandler2() throws Exception {
+		bpelFile = bpelTestsDir+"testThrowInScopeInFaultHandler2/bpelTestThrowInScopeInFaultHandler2.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testThrowInScopeInFaultHandler2/msg.txt" };
+		expectedResponse = ".*>doesn&amp;apos;t work<.*";
+		assertTrue(go(0,null));
+	}
+	
+	// this realy doesn't test the deadlock
+	// this test is also run in another appserver threaded test
+	// to test for the deadlock
+	public void testBPInvokeDeadlock() throws Exception {
+		bpelFile = bpelTestsDir+"testBPInvokeDeadlock/bpelTestBPInvokeDeadlock.jar";
+		threadNumber=1;
+		msgFiles = new String [] {bpelTestsDir+"testBPInvokeDeadlock/deadlock1.txt",
+				bpelTestsDir+"testBPInvokeDeadlock/deadlock2.txt"};
+		expectedResponse = 
+			"Fault Message:null\n"+
+			"Part \"newParameter2\" value: test\n"+
+			"Fault Message:null\n"+
+			"Part \"newParameter2\" value: test\n";
+		assertTrue(go(0,null));
+	}
+
+	/* (non-Javadoc)
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+		getSystemProps();
+	}
+}

Added: incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELTests.java.keep
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELTests.java.keep?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELTests.java.keep (added)
+++ incubator/ode/scratch/bpe/src/test/java/com/sybase/bpe/test/BPELTests.java.keep Tue Feb 28 08:02:48 2006
@@ -0,0 +1,642 @@
+/*
+ * Created on Jan 26, 2004
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+package com.sybase.bpe.test;
+
+import java.util.Iterator;
+
+import com.sybase.bpe.cc.client.InstanceState;
+import com.sybase.bpe.cc.data.DefinitionData;
+import com.sybase.bpe.cc.data.InstanceData;
+
+
+/**
+ * @author charper
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class BPELTests extends BPELTester {
+	
+
+
+	/**
+	 * Constructor for BPELTests.
+	 * @param arg0
+	 */
+	public BPELTests(String arg0) {
+		super(arg0);
+	}
+	
+
+	
+	public void testTest1() throws Exception {
+		
+		bpelFile = "test1/bpelTest1.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test1/data1_1.txt","test1/data1_2.txt",
+			"test1/data1_3.txt","test1/data1_4.txt","test1/data1_5.txt",
+			"test1/data1_6.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: test1Process complete\n"+
+"Part \"replyText\" value: Event Start Test1.1 -> root process splits into A and B -> process [AB] completes -> process [AB] completes -> processes A and B merge on process C -> merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: test1Process complete\n"+
+"Part \"replyText\" value: Event Start Test1.2 -> root process splits into A and B -> process [AB] completes -> process [AB] completes -> merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: test1Process complete\n"+
+"Part \"replyText\" value: Event Start Test1.3 -> root process splits into A and B -> process [AB] completes -> process [AB] completes -> merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: test1Process complete\n"+
+"Part \"replyText\" value: Event Start Test1.4 -> root process splits into A and B -> process [AB] completes -> process [AB] completes -> merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: test1Process complete\n"+
+"Part \"replyText\" value: Event Start Test1.5 -> root process splits into A and B -> process [AB] completes -> process [AB] completes -> processes A and B merge on process C -> merge into root process -> test switch statement -> case max: set loop iterations = 10 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10 -> 11 -> test1Process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: test1Process complete\n"+
+"Part \"replyText\" value: Event Start Test1.6 -> root process splits into A and B -> process [AB] completes -> process [AB] completes -> processes A and B merge on process C -> merge into root process -> test switch statement -> otherwise: set loop iterations = 0 -> test loop iterations -> test1Process complete\n";
+
+		assertTrue(go(0, null));	
+	}
+		
+	public void testTest10() throws Exception {
+		bpelFile = "test10/bpelTest10.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test10/data10_1.txt","test10/data10_3.txt",
+			"test10/data10_4.txt","test10/data10_2.txt"};
+		expectedResponse=
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test10.1 -> block for next message -> received event on port test10_3PT -> received event on port test10_4PT -> process complete\n";
+		assertTrue(go(0, null));
+	}
+		
+		
+	public void testTest12() throws Exception {
+		bpelFile = "test12/bpelTest12.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test12/data12_1.txt"};
+		expectedResponse = 
+"Fault Message:null\n"+
+"Part \"replyID\" value: Start Test12\n"+
+"Part \"replyText\" value: pass\n";
+		assertTrue(go(0, null));
+	}
+		
+	public void testTest13() throws Exception {
+		bpelFile = "test13/bpelTest13.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test13/data13_1.txt"};
+		expectedResponse ="Fault Message:null\n"+
+"Part \"replyID\" value: Test13\n"+
+"Part \"replyText\" value: pass\n";
+		assertTrue(go(0, null));
+	}
+		
+	public void testTest14() throws Exception {
+		bpelFile = "test14/bpelTest14.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test14/data14_1.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: Test14\n"+
+"Part \"replyText\" value: pass\n";
+		assertTrue(go(0, null));
+	}
+		
+	public void testTest15() throws Exception {
+		bpelFile = "test15/bpelTest15.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test15/data15_1.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: Start Test15\n"+
+"Part \"replyText\" value: pass\n";
+		assertTrue(go(0, null));
+	}
+		
+	public void testTest2() throws Exception {
+		bpelFile = "test2/bpelTest2.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test2/data2_1.txt","test2/data2_2.txt",
+			"test2/data2_3.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test2.1 -> throw testFault -> caught testFault -> process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: caught fault with catchAll\n"+
+"Part \"replyText\" value: Event Start Test2.2 -> throw unknown fault -> caught fault with catchAll\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test2.3 -> process complete\n";
+		assertTrue(go(0, null));
+	}
+		
+	public void testTest3() throws Exception {
+		bpelFile = "test3/bpelTest3.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test3/data3_1.txt","test3/data3_2.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test3.1 -> begin fault test -> throw testFault -> caught testFault -> process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test3.2 -> begin fault test -> throw unknown fault -> process complete\n";
+		assertTrue(go(0, null));
+	}
+
+				
+	public void testTest5() throws Exception {
+		bpelFile = "test5/bpelTest5.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test5/data5_1_1.txt","test5/data5_1_2.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test5.1 -> loop on receive until message includes requestEnd = yes -> received message -> process complete\n";
+		assertTrue(go(0, null));
+	}
+		
+	public void testTest6() throws Exception {
+		bpelFile = "test6/bpelTest6.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test6/data6_1.txt","test6/data6_2.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test6.1 -> pick branch one invoked -> process complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test6.2 -> pick branch two invoked -> process complete\n";
+		assertTrue(go(0, null));
+	}
+
+	public void testTest7() throws Exception {
+		bpelFile = "test7/bpelTest7.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test7/data7_1.txt","test7/data7_3.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test7.1 -> block for next message -> pick branch two invoked -> process complete\n";
+		assertTrue(go(0, null));
+	}
+
+	
+	public void testTest8() throws Exception {
+		bpelFile = "test8/bpelTest8.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test8/data8_1.txt","test8/data8_3.txt",
+		"test8/data8_4.txt","test8/data8_2.txt","test8/data8_2.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test8.1 -> block for next message -> received event on port test8_3PT -> received event on port test8_4PT -> block for next message -> process complete\n";
+		assertTrue(go(0, null));
+	}
+
+	public void testTest9() throws Exception {
+		bpelFile = "test9/bpelTest9.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test9/data9_1.txt","test9/data9_2_1.txt",
+		"test9/data9_2_2.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test9.1 -> loop on pick until message includes requestEnd = yes -> pick branch one invoked -> pick branch two invoked -> process complete\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testTest16() throws Exception {
+		bpelFile = "test16/bpelTest16.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test16/data16_1.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n" +
+"Part \"replyText\" value: Event Start Test16.1 -> caught uninitializedVariable -> process complete\n";
+
+		
+		assertTrue(go(0, null));
+	}
+	
+	public void testTest17() throws Exception {
+		bpelFile = "test17/bpelTest17.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test17/data17_1.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: process complete\n"+
+"Part \"replyText\" value: Event Start Test17.1 -> caught FaultMessage -> fault text one -> process complete\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testTestBPChain() throws Exception {
+		bpelFile = "testBPChain/bpelTestBPChain.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testBPChain/data1_1.txt"};
+		expectedResponse = "Fault Message:null.*response1.*some reply text.*";
+/*"Fault Message:null\n"+
+"Part \"responses\" value: <.xml version=\"1.0\" encoding=\"UTF-8\".>\n"+
+"<response1>response1</response1>\n"+
+"Part \"replyID\" value: a reply ID\n"+
+"Part \"replyText\" value: some reply text\n";*/
+		
+		assertTrue(go(0, null));
+	}
+	
+/*	public void testTimer1() throws Exception {
+		bpelFile = "testTimer1/bpelTestTimer1.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testTimer1/timer1Data.txt","testTimer1/timer1Data.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyText\" value: PT3SPT7S\n";
+		assertTrue(go(30000));
+	}
+	
+	public void testTimer2() throws Exception {
+		bpelFile = "testTimer2/bpelTestTimer2.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testTimer2/timer2Data.txt","testTimer2/timer2Data.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyText\" value: TESTPT7S\n";
+		assertTrue(go(20000));
+	}
+	
+	public void testTimer3() throws Exception {
+		bpelFile = "testTimer3/bpelTestTimer3.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testTimer3/timer3Data.txt"};
+		expectedResponse =
+"Fault Message:null\n";
+		assertTrue(go(1000));
+	}*/
+	
+	public void testTerminate() throws Exception {
+		bpelFile = "testTerminate/bpelTestTerminate.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testTerminate/terminate1Data.txt"};
+		expectedResponse =
+"Fault Message:null\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testTerminateTest5() throws Exception {
+		bpelFile = "test5/bpelTest5.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"test5/data5_1_1.txt"}; //,"test5/data5_1_2.txt"};
+		expectedResponse =
+"Fault Message:null\n";//+
+//"Fault Message:null\n"+
+//"Part \"replyID\" value: process complete\n"+
+//"Part \"replyText\" value: Event Start Test5.1 -> loop on receive until message includes requestEnd = yes -> received message -> process complete\n";
+		//assertTrue(
+		go(0, null);//);
+		
+		Iterator it = ccs.getDefinitionData().iterator();
+		while ( it.hasNext() ) {
+			DefinitionData dd = (DefinitionData)it.next();
+			if ( dd.getName().equals("test5Process")) {
+				Iterator it2 = ccs.getInstancesData(dd.getID()).iterator();
+				while ( it2.hasNext() ) {
+					InstanceData id = (InstanceData)it2.next();
+					ccs.terminateInstance(id);
+				}
+				break;
+			}
+		}
+		
+		// look for the process agian
+		it = ccs.getDefinitionData().iterator();
+		while ( it.hasNext() ) {
+			DefinitionData dd = (DefinitionData)it.next();
+			if ( dd.getName().equals("test5Process")) {
+				Iterator it2 = ccs.getInstancesData(dd.getID()).iterator();
+				while ( it2.hasNext() ) {
+					InstanceData id = (InstanceData)it2.next();
+					if ( ! id.getState().toString().equals(InstanceState.FINISHED.toString()) ) {
+						assertTrue(false);
+						return;
+					}
+				}
+			}
+		}
+		assertTrue(true);
+	}
+	
+	 
+	
+	public void testScopedCorrelationSets() throws Exception {
+		bpelFile = "testScopedCorrelationSets/bpelTestScopedCorrelationSets.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testScopedCorrelationSets/data1.txt",
+				"testScopedCorrelationSets/data2.txt","testScopedCorrelationSets/data3.txt"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Fault Message:null\n"+
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: corrl2\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testCatchForcedTermination() throws Exception {
+		bpelFile = "testCatchForcedTerminate/bpelTestCatchForcedTerminate.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testCatchForcedTerminate/data1.txt",
+				"testCatchForcedTerminate/data3.txt"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: forcedTermination\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testFaultInCompensationHandler() throws Exception {
+		bpelFile = "testFaultInCompensationHandler/bpelTestFaultInCompensationHandler.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testFaultInCompensationHandler/data1.txt",
+				"testFaultInCompensationHandler/data3.txt"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: msg1\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testFaultInFaultHandler() throws Exception {
+		bpelFile = "testFaultInFaultHandler/bpelTestFaultInFaultHandler.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testFaultInFaultHandler/data1.txt"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: ScopeOneTwoFaultHandler -> RootScopeFaultHandler\n";
+		assertTrue(go(0, null));
+	}
+	
+/*	public void testTimerOnAlarmAtRootScope() throws Exception {
+		bpelFile = "testTimerOnAlarmAtRootScope/bpelTestTimerOnAlarmAtRootScope.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testTimerOnAlarmAtRootScope/timer1Data.txt","testTimerOnAlarmAtRootScope/timer1Data.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"replyText\" value: PT3SPT7S\n";
+		assertTrue(go(30000));
+	}*/
+	
+	public void testOOBData() throws Exception {
+		bpelFile = "testOOBData/bpelTestOOBData.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testOOBData/oOBData.txt","testOOBData/oOBData2.txt"};
+		Object[] oobData = new Object[] {"junk",null};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: junk\n";
+		assertTrue(go(0, oobData));
+	}
+	
+	public void testNSDeploy() throws Exception {
+		bpelFile = "testNSDeploy/bpelTestNSDeploy.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testNSDeploy/nSDeploy.txt"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: PT7S\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testLocalInvoke() throws Exception {
+		bpelFile = "testLocalInvoke/bpelTestLocalInvoke.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testLocalInvoke/localInvoke1.txt"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: test\n";
+		assertTrue(go(0, null));
+	}
+
+	public void testLinkInSwitch() throws Exception {
+		bpelFile = "testLinkInSwitch/bpelTestLinkInSwitch.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testLinkInSwitch/dataLIS_1.txt","testLinkInSwitch/dataLIS_2.txt",
+			"testLinkInSwitch/dataLIS_3.txt"};
+		expectedResponse =
+"Fault Message:null\n"+
+"Part \"replyID\" value: testLinkInSwitch complete\n"+
+"Part \"replyText\" value: Start TestLIS.1 -> case1 -> test switch link -> switch-case1 -> known-message -> testLinkInSwitch complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: testLinkInSwitch complete\n"+
+"Part \"replyText\" value: Start TestLIS.2 -> case2 -> test switch link -> switch-case2 -> known-message -> testLinkInSwitch complete\n"+
+"Fault Message:null\n"+
+"Part \"replyID\" value: testLinkInSwitch complete\n"+
+"Part \"replyText\" value: Start TestLIS.3 -> otherwise -> test switch link -> switch-otherwise -> unknown-message -> testLinkInSwitch complete\n";
+		assertTrue(go(0, null));
+	}	
+	
+	public void testQts377278() throws Exception {
+		bpelFile = "testQts377278/bpelTestQts377278.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testQts377278/data.txt"};
+		expectedResponse =
+			"Fault Message:null\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testPartnerLinkAssign() throws Exception {
+		bpelFile = "testPartnerLinkAssign/bpelTestPartnerLinkAssign.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testPartnerLinkAssign/data.txt"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Part \"replyText\" value: partnerLinkDataInpartnerLinkDataOut\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testNestedSplits() throws Exception {
+		bpelFile = "testNestedSplits/bpelTestNestedSplits.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testNestedSplits/links.props"};
+		expectedResponse =
+			"Fault Message:null\n"+
+			"Part \"InParam\" value: franklin\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testReplyWithFault() throws Exception {
+		bpelFile = "testReplyWithFault/bpelTestReplyWithFault.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testReplyWithFault/dataReplyWithFault.txt"};
+		expectedResponse =
+"Fault Message:Fault Actor:null Fault Code:null Fault String:testFault\n"+
+"FaultPart \"faultID\" value: fault text one\n"+
+"FaultPart \"faultText\" value: Event Start Test ReplyWithFault -> caught FaultMessage -> fault text one\n\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testCorrlCmplx() throws Exception {
+		bpelFile = "testCorrlCmplx/bpelTestCorrlCmplx.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testCorrlCmplx/msg1.txt",
+				"testCorrlCmplx/msg2.txt",
+				"testCorrlCmplx/msg3.txt"};
+		expectedResponse = 
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Fault Message:null\n"+
+"Part \"newParameter2\" value: cory\n";
+		assertTrue(go(0, null));
+	}
+	
+	public void testCorrlInvokeReply() throws Exception {
+		bpelFile = "testCorrlInvokeReply/bpelTestCorrlInvokeReply.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testCorrlInvokeReply/msg1.txt",
+				"testCorrlInvokeReply/msg2.txt",
+				"testCorrlInvokeReply/msg3.txt",
+				"testCorrlInvokeReply/msg4.txt"};
+		expectedResponse = ".*xml.*jayme.*cory.*heading.*body.*cory.*testinvoke.*jayme.*";
+//"Fault Message:null\n"+
+//"Part \"newParameter2\" value: <?xml version=\"1.0\" encoding=\"UTF-8\"?><tns1:note xmlns:tns=\"urn:mycompany:/corrlcr/invokereplycorrls\" xmlns:tns1=\"http://www.w3schools.com\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><tns1:to>jayme</tns1:to><tns1:from>cory</tns1:from><tns1:heading>heading</tns1:heading><tns1:body>body</tns1:body></tns1:note>\n"+
+//"Fault Message:null\n"+
+//"Part \"newParameter2\" value: cory\n"+
+//"Fault Message:null\n"+
+//"Part \"newParameter2\" value: testinvoke\n"+
+//"Fault Message:null\n"+
+//"Part \"newParameter2\" value: jayme";
+		assertTrue(go(0, null));
+	}
+	
+	public void testGraftGraftChildren() throws Exception {
+		bpelFile = "testGraftGraftChildren/bpelTestGraftGraftChildren.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testGraftGraftChildren/msg1.txt"};
+		expectedResponse = ".*Sombrero.*Slippers.*";
+		assertTrue(go(0, null));
+	}
+	
+	public void testLoopedCompensation2() throws Exception {
+		bpelFile = "testLoopedCompensation2/bpelTestLoopedCompensation2.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testLoopedCompensation2/msg1.txt"};
+		expectedResponse = ".*AppendVar:01234567899876543210.*";
+		assertTrue(go(0, null));
+	}
+	
+	public void testBuildDocWithNestedNS() throws Exception {
+		bpelFile = "testBuildDocWithNestedNS/bpelTestBuildDocWithNestedNS.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testBuildDocWithNestedNS/company.txt"};
+		expectedResponse = ".*<ns0:Company xmlns:ns0=\"http://www.company.org\" xmlns:ns1=\"http://www.person.org\" xmlns:ns2=\"http://www.product.org\"><ns0:Person><ns1:Name>John Doe</ns1:Name><ns1:SSN>123-45-6789</ns1:SSN></ns0:Person><ns0:Product><ns2:Type>Widget</ns2:Type></ns0:Product></ns0:Company>.*";
+		assertTrue(go(0, null));
+	}
+	
+	public void testSingleRuleInCompHandler() throws Exception {
+		bpelFile = "testSingleRuleInCompHandler/bpelTestSingleRuleInCompHandler.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testSingleRuleInCompHandler/msg1.txt"};
+		expectedResponse = ".*true.*";
+		assertTrue(go(0, null));
+	}
+	
+	public void testCatchAllNonBPError1() throws Exception {
+		bpelFile = "testCatchAllNonBPError/bpelTestCatchAllNonBPError.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testCatchAllNonBPError/msg1.txt"};
+		expectedResponse = ".*catchAll.*";
+		assertTrue(go(0, null));
+	}
+	
+	public void testCatchAllNonBPError2() throws Exception {
+		bpelFile = "testCatchAllNonBPError/bpelTestCatchAllNonBPError.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testCatchAllNonBPError/msg2.txt"};
+		expectedResponse = ".*catchAll.*";
+		assertTrue(go(0, null));
+	}
+	
+	public void testCatchAllNonBPError3() throws Exception {
+		bpelFile = "testCatchAllNonBPError/bpelTestCatchAllNonBPError.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testCatchAllNonBPError/msg3.txt"};
+		expectedResponse = ".*catchAll.*";
+		assertTrue(go(0, null));
+	}
+	
+	public void testCatchFaultInFaultHandler() throws Exception {
+		bpelFile = "testCatchFaultInFaultHandler/bpelTestCatchFaultInFaultHandler.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testCatchFaultInFaultHandler/msg.txt"};
+		expectedResponse = ".*>works<.*";
+		assertTrue(go(0,null));
+	}
+	
+	public void testCatchFaultInFaultHandler2() throws Exception {
+		bpelFile = "testCatchFaultInFaultHandler2/bpelTestCatchFaultInFaultHandler2.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testCatchFaultInFaultHandler2/msg.txt"};
+		expectedResponse = ".*>works<.*";
+		assertTrue(go(0,null));
+	}
+	
+	public void testThrowInScopeInFaultHandler() throws Exception {
+		bpelFile = "testThrowInScopeInFaultHandler/bpelTestThrowInScopeInFaultHandler.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testThrowInScopeInFaultHandler/msg.txt" };
+		expectedResponse = ".*>doesn&amp;apos;t work<.*";
+		assertTrue(go(0,null));
+	}
+	
+	public void testThrowInScopeInFaultHandler2() throws Exception {
+		bpelFile = "testThrowInScopeInFaultHandler2/bpelTestThrowInScopeInFaultHandler2.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testThrowInScopeInFaultHandler2/msg.txt" };
+		expectedResponse = ".*>doesn&amp;apos;t work<.*";
+		assertTrue(go(0,null));
+	}
+	
+	// this realy doesn't test the deadlock
+	// this test is also run in another appserver threaded test
+	// to test for the deadlock
+	public void testBPInvokeDeadlock() throws Exception {
+		bpelFile = "testBPInvokeDeadlock/bpelTestBPInvokeDeadlock.jar";
+		threadNumber=1;
+		msgFiles = new String [] {"testBPInvokeDeadlock/deadlock1.txt",
+				"testBPInvokeDeadlock/deadlock2.txt"};
+		expectedResponse = 
+			"Fault Message:null\n"+
+			"Part \"newParameter2\" value: test\n"+
+			"Fault Message:null\n"+
+			"Part \"newParameter2\" value: test\n";
+		assertTrue(go(0,null));
+	}
+
+	/* (non-Javadoc)
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+		getSystemProps();
+	}
+}