diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-09-25 23:35:55 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-09-25 23:35:55 +0000 |
commit | 6e55b9d5cf7afffdb3b5860f735a75ae02964984 (patch) | |
tree | 7616e60612cd4a4eb24f8542c5e3e73ed3539218 /java/sca/itest/scopes/src/test | |
parent | 7ceed60d0af823f42885087a7f17cfd3e5fb9610 (diff) |
TUSCANY-3280 - Removing obsolete iTests that were exercising REQUEST Scope
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@819066 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/itest/scopes/src/test')
-rw-r--r-- | java/sca/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java | 48 |
1 files changed, 12 insertions, 36 deletions
diff --git a/java/sca/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java b/java/sca/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java index 959a6067ee..594bdd5038 100644 --- a/java/sca/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java +++ b/java/sca/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java @@ -43,32 +43,31 @@ public class ScopeTestCase { private Node node; - /** - * Test scope containers. - * - * The request scope container isn't hooked up for some reason so the code below - * that tests request scope is commented out. - * Code could be added to test session scope once it is supported in a standalone environment. - * - * @throws InterruptedException Test failed - */ + @Before + public void setUp() throws Exception { + String location = ContributionLocationHelper.getContributionLocation("scopes.composite"); + node = NodeFactory.newInstance().createNode("scopes.composite", new Contribution("c1", location)); + node.start(); + } + + @After + public void tearDown() throws Exception { + node.stop(); + } + @Test public void testScopes() throws InterruptedException { Thread[] moduleScopeThreadTable = new Thread[NUM_THREADS]; - Thread[] requestScopeThreadTable = new Thread[NUM_THREADS]; for (int i = 0; i < NUM_THREADS; i++) { moduleScopeThreadTable[i] = new ModuleScopeTestThread(); - requestScopeThreadTable[i] = new RequestScopeTestThread(); } for (int j = 0; j < NUM_THREADS; j++) { moduleScopeThreadTable[j].start(); - requestScopeThreadTable[j].start(); } for (int k = 0; k < NUM_THREADS; k++) { moduleScopeThreadTable[k].join(); - requestScopeThreadTable[k].join(); } } @@ -85,29 +84,6 @@ public class ScopeTestCase { } } - private class RequestScopeTestThread extends Thread { - - public void run() { - StateVerifier requestScopeService = node.getService(StateVerifier.class, "RequestScopeComponent"); - for (int i = 1; i <= ITERATIONS; i++) { - requestScopeService.setState(i); - if (!requestScopeService.checkState(i)) { - fail("The request scope service lost its state on iteration " + i); - } - } - } - } - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("scopes.composite"); - node = NodeFactory.newInstance().createNode("scopes.composite", new Contribution("c1", location)); - node.start(); - } - @After - public void tearDown() throws Exception { - node.stop(); - } } |