summaryrefslogtreecommitdiffstats
path: root/java/sca/itest/scopes/src
diff options
context:
space:
mode:
authormcombellack <mcombellack@13f79535-47bb-0310-9956-ffa450edef68>2008-12-08 13:29:12 +0000
committermcombellack <mcombellack@13f79535-47bb-0310-9956-ffa450edef68>2008-12-08 13:29:12 +0000
commit6a4273a1fa5f0fc32c76d9c8bf23e9b7597ba44e (patch)
treefea192be3dc79e3a720ef9fb8fa083dc6ded7e09 /java/sca/itest/scopes/src
parentaadf8f8157c28bf822a73ec55d2099b414085dc4 (diff)
Made the constants private static final and use the correct variable naming scheme (i.e. capitals and '_')
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@724336 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/itest/scopes/src')
-rw-r--r--java/sca/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java18
1 files changed, 9 insertions, 9 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 47d2d08a18..3f841910ec 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
@@ -31,8 +31,8 @@ import org.junit.Test;
public class ScopeTestCase {
- static final int numThreads = 4; // number of threads to drive each scope container
- static final int iterations = 200; // number of iterations per thread
+ private static final int NUM_THREADS = 4; // number of threads to drive each scope container
+ private static final int ITERATIONS = 200; // number of iterations per thread
private Node node;
// Test scope containers.
@@ -42,18 +42,18 @@ public class ScopeTestCase {
@Test
public void testScopes() throws InterruptedException {
- Thread[] moduleScopeThreadTable = new Thread[numThreads];
- Thread[] requestScopeThreadTable = new Thread[numThreads];
+ Thread[] moduleScopeThreadTable = new Thread[NUM_THREADS];
+ Thread[] requestScopeThreadTable = new Thread[NUM_THREADS];
- for (int i = 0; i < numThreads; i++) {
+ for (int i = 0; i < NUM_THREADS; i++) {
moduleScopeThreadTable[i] = new ModuleScopeTestThread();
requestScopeThreadTable[i] = new RequestScopeTestThread();
}
- for (int j = 0; j < numThreads; j++) {
+ for (int j = 0; j < NUM_THREADS; j++) {
moduleScopeThreadTable[j].start();
requestScopeThreadTable[j].start();
}
- for (int k = 0; k < numThreads; k++) {
+ for (int k = 0; k < NUM_THREADS; k++) {
moduleScopeThreadTable[k].join();
requestScopeThreadTable[k].join();
}
@@ -63,7 +63,7 @@ public class ScopeTestCase {
public void run() {
StateVerifier moduleScopeService = node.getService(StateVerifier.class, "ModuleScopeComponent");
- for (int i = 1; i <= iterations; i++) {
+ for (int i = 1; i <= ITERATIONS; i++) {
moduleScopeService.setState(i);
if (!moduleScopeService.checkState(i)) {
fail("The module scope service lost its state on iteration " + i);
@@ -76,7 +76,7 @@ public class ScopeTestCase {
public void run() {
StateVerifier requestScopeService = node.getService(StateVerifier.class, "RequestScopeComponent");
- for (int i = 1; i <= iterations; i++) {
+ 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);