summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68>2011-01-20 15:29:57 +0000
committerscottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68>2011-01-20 15:29:57 +0000
commita23dc1b3186f4a4f88d0efc40d3c7ecfa658af53 (patch)
treee59d1142ea341a0f5e31da52598e232fcd612dcb
parent371706216340031b11ecdc6bf9f0ba1b778a22d6 (diff)
Expedite test execution by doing static setup/teardown
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1061343 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java19
-rw-r--r--sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java17
2 files changed, 18 insertions, 18 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java b/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java
index f8d06697a6..903ac9f86b 100644
--- a/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java
+++ b/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java
@@ -30,8 +30,8 @@ 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.After;
-import org.junit.Before;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
import org.junit.Test;
/**
@@ -39,10 +39,10 @@ import org.junit.Test;
*/
public class OrderServiceBareTestCase {
- private Node node;
+ private static Node node;
- @Before
- public void startServer() throws Exception {
+ @BeforeClass
+ public static void startServer() throws Exception {
try {
NodeFactory factory = NodeFactory.newInstance();
@@ -120,7 +120,7 @@ public class OrderServiceBareTestCase {
}
@Test
- public void testOrderReviewOutHolderSCA() throws IOException {
+ public void testOrderReviewBareOutHolderSCA() throws IOException {
OrderServiceBare orderServiceBare =
node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare");
assertNotNull(orderServiceBare);
@@ -128,7 +128,7 @@ public class OrderServiceBareTestCase {
}
@Test
- public void testOrderReviewOutHolderWS() throws IOException {
+ public void testOrderReviewBareOutHolderWS() throws IOException {
OrderServiceBare orderServiceBare =
node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare");
assertNotNull(orderServiceBare);
@@ -195,8 +195,9 @@ public class OrderServiceBareTestCase {
}
- @After
- public void stopServer() throws Exception {
+
+ @AfterClass
+ public static void stopServer() throws Exception {
if (node != null)
node.stop();
}
diff --git a/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java b/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java
index 17db43b4e8..cb18d1f265 100644
--- a/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java
+++ b/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java
@@ -30,8 +30,8 @@ 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.After;
-import org.junit.Before;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
import org.junit.Test;
/**
@@ -39,12 +39,11 @@ import org.junit.Test;
*/
public class OrderServiceTestCase {
- private Node node;
+ private static Node node;
- @Before
- public void startServer() throws Exception {
+ @BeforeClass
+ public static void startServer() throws Exception {
try {
-
NodeFactory factory = NodeFactory.newInstance();
String contribution = ContributionLocationHelper.getContributionLocation(OrderService.class);
node = factory.createNode("ordersca.composite", new Contribution("order", contribution)).start();
@@ -295,9 +294,9 @@ public class OrderServiceTestCase {
assertEquals("retval2", returnValue[1]);
assertTrue(outParam.value.floatValue() == 97);
}
-
- @After
- public void stopServer() throws Exception {
+
+ @AfterClass
+ public static void stopServer() throws Exception {
if (node != null)
node.stop();
}