Author: mriou
Date: Tue Mar 18 20:12:26 2008
New Revision: 638691

URL: http://svn.apache.org/viewvc?rev=638691&view=rev
Log:
ODE-247 Test fix when running more than once.

Modified:
    
ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java

Modified: 
ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java?rev=638691&r1=638690&r2=638691&view=diff
==============================================================================
--- 
ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
 (original)
+++ 
ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
 Tue Mar 18 20:12:26 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);
+        }
     }
 }


Reply via email to