From 1e1a61f7bb5c926ef1aabafa14f114d636b12699 Mon Sep 17 00:00:00 2001 From: antelder Date: Thu, 16 Aug 2012 07:58:12 +0000 Subject: This test fails often in the jenkins builds, can't see why so fiddle about with the testcase and and a short delay before running to see if that helps git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1373746 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/binding/rest/RESTReferenceTestCase.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'sca-java-2.x') diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/RESTReferenceTestCase.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/RESTReferenceTestCase.java index a2cc984f77..de11033d15 100644 --- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/RESTReferenceTestCase.java +++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/RESTReferenceTestCase.java @@ -18,40 +18,40 @@ */ package org.apache.tuscany.sca.binding.rest; -import java.util.Arrays; - import junit.framework.Assert; import org.apache.tuscany.sca.node.Contribution; import org.apache.tuscany.sca.node.ContributionLocationHelper; import org.apache.tuscany.sca.node.Node; import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import services.echo.jaxrs.Echo; public class RESTReferenceTestCase { private static final String ECHO_COMPONENT_WITH_REFERENCE = "EchoClientComponent/Echo"; - private static Node node; + private Node node; - @BeforeClass - public static void setUp() throws Exception { + @Before + public void setUp() throws Exception { try { String contribution = ContributionLocationHelper.getContributionLocation(RESTReferenceTestCase.class); node = NodeFactory.newInstance().createNode("rest-reference.composite", new Contribution("testClient", contribution)); node.start(); + + Thread.sleep(1000); } catch (Exception e) { e.printStackTrace(); } } - @AfterClass - public static void tearDown() throws Exception { + @After + public void tearDown() throws Exception { node.stop(); } -- cgit v1.2.3