Author: ningjiang
Date: Wed May 5 01:08:28 2010
New Revision: 941128
URL: http://svn.apache.org/viewvc?rev=941128&view=rev
Log:
Try to fix the unit test error of camel-cxf
Modified:
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java
Modified:
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java?rev=941128&r1=941127&r2=941128&view=diff
==============================================================================
---
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java
(original)
+++
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java
Wed May 5 01:08:28 2010
@@ -29,6 +29,7 @@ import org.apache.hello_world_soap_http.
import org.apache.hello_world_soap_http.GreeterImpl;
import org.apache.hello_world_soap_http.NoSuchCodeLitFault;
import org.junit.After;
+import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -36,6 +37,7 @@ import org.springframework.context.suppo
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class CXFGreeterRouterTest extends CamelTestSupport {
+ protected static Endpoint endpoint;
protected AbstractXmlApplicationContext applicationContext;
private final QName serviceName = new
QName("http://apache.org/hello_world_soap_http",
@@ -69,7 +71,14 @@ public class CXFGreeterRouterTest extend
public static void startService() {
Object implementor = new GreeterImpl();
String address = "http://localhost:9000/SoapContext/SoapPort";
- Endpoint.publish(address, implementor);
+ endpoint = Endpoint.publish(address, implementor);
+ }
+
+ @AfterClass
+ public static void stopService() {
+ if (endpoint != null) {
+ endpoint.stop();
+ }
}
@Test