You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ge...@apache.org on 2012/11/09 17:21:40 UTC
svn commit: r1407522 -
/servicemix/components/trunk/engines/servicemix-exec/src/test/java/org/apache/servicemix/exec/tests/smx3/ExecEndpointTest.java
Author: gertv
Date: Fri Nov 9 16:21:40 2012
New Revision: 1407522
URL: http://svn.apache.org/viewvc?rev=1407522&view=rev
Log:
SMXCOMP-953: ExecEndpointTest hangs on Windows
Modified:
servicemix/components/trunk/engines/servicemix-exec/src/test/java/org/apache/servicemix/exec/tests/smx3/ExecEndpointTest.java
Modified: servicemix/components/trunk/engines/servicemix-exec/src/test/java/org/apache/servicemix/exec/tests/smx3/ExecEndpointTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-exec/src/test/java/org/apache/servicemix/exec/tests/smx3/ExecEndpointTest.java?rev=1407522&r1=1407521&r2=1407522&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-exec/src/test/java/org/apache/servicemix/exec/tests/smx3/ExecEndpointTest.java (original)
+++ servicemix/components/trunk/engines/servicemix-exec/src/test/java/org/apache/servicemix/exec/tests/smx3/ExecEndpointTest.java Fri Nov 9 16:21:40 2012
@@ -32,13 +32,18 @@ import org.apache.servicemix.exec.ExecCo
import org.apache.servicemix.jbi.container.JBIContainer;
import org.apache.servicemix.jbi.jaxp.SourceTransformer;
import org.apache.servicemix.jbi.jaxp.StringSource;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
/**
* Test the Exec XBean descriptor.
*
* @author jbonofre
*/
-public class ExecEndpointTest extends TestCase {
+public class ExecEndpointTest {
protected JBIContainer container;
@@ -46,7 +51,8 @@ public class ExecEndpointTest extends Te
* (non-Javadoc)
* @see junit.framework.TestCase#setUp()
*/
- protected void setUp() throws Exception {
+ @Before
+ public void setUp() throws Exception {
// start SMX JBI container
container = new JBIContainer();
container.setUseMBeanServer(false);
@@ -71,7 +77,8 @@ public class ExecEndpointTest extends Te
* (non-Javadoc)
* @see junit.framework.TestCase#tearDown()
*/
- protected void tearDown() throws Exception {
+ @After
+ public void tearDown() throws Exception {
if (container != null) {
container.shutDown();
}
@@ -84,6 +91,7 @@ public class ExecEndpointTest extends Te
*
* @throws Exception in case of lookup failure.
*/
+ @Test(timeout=60000)
public void testDeployment() throws Exception {
// test if the endpoint is present
assertNotNull("The endpoint http://test/service/exec is not found in the JBI container.", container.getRegistry().getEndpoint(new QName("http://test", "service"), "exec"));
@@ -99,6 +107,7 @@ public class ExecEndpointTest extends Te
*
* @throws Exception if an error occurs during the test.
*/
+ @Test(timeout=60000)
public void testInOnlyWithValidPayloadMessage() throws Exception {
// InOnly MEP test
DefaultServiceMixClient client = new DefaultServiceMixClient(container);
@@ -128,6 +137,7 @@ public class ExecEndpointTest extends Te
*
* @throws Exception
*/
+ @Test(timeout=60000)
public void testInOnlyWithEmptyMessage() throws Exception {
// InOnly MEP test
DefaultServiceMixClient client = new DefaultServiceMixClient(container);
@@ -152,6 +162,7 @@ public class ExecEndpointTest extends Te
*
* @throws Exception if an error occurs during the test.
*/
+ @Test(timeout=60000)
public void testInOutWithValidMessage() throws Exception {
// InOut MEP test
DefaultServiceMixClient client = new DefaultServiceMixClient(container);