Author: mriou
Date: Tue Mar 18 20:12:11 2008
New Revision: 638690
URL: http://svn.apache.org/viewvc?rev=638690&view=rev
Log:
ODE-247 Test fix when running more than once.
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
URL:
http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java?rev=638690&r1=638689&r2=638690&view=diff
==============================================================================
---
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
(original)
+++
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
Tue Mar 18 20:12:11 2008
@@ -17,14 +17,21 @@
}
public void testSimpleFaultCatch() throws Exception {
+ String bundleName = "TestStructuredFault";
+ // deploy the required service
server.deployService(DummyService.class.getCanonicalName());
- server.deployProcess("TestStructuredFault");
+ // Deploy the process if necessary.
+ // Actually undeployed process are automatically re-deployed during
ODE Server start-up.
+ if(!server._ode.getProcessStore().getPackages().contains(bundleName)){
+ server.deployProcess(bundleName);
+ }
+ try {
+ String response =
server.sendRequestFile("http://localhost:8080/processes/helloWorld",
+ bundleName, "testRequest.soap");
- String response =
server.sendRequestFile("http://localhost:8080/processes/helloWorld",
- "TestStructuredFault", "testRequest.soap");
-
- assert(response.indexOf("Something went wrong. Fortunately, it was
meant to be.") >= 0);
-
- server.undeployProcess("TestStructuredFault");
+ assert(response.indexOf("Something went wrong. Fortunately, it was
meant to be.") >= 0);
+ } finally {
+ server.undeployProcess(bundleName);
+ }
}
}