geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: rev 55278 - geronimo/trunk/modules/network/src/test/org/apache/geronimo/network/protocol
Date Thu, 21 Oct 2004 22:24:46 GMT
Author: adc
Date: Thu Oct 21 15:24:46 2004
New Revision: 55278

Modified:
   geronimo/trunk/modules/network/src/test/org/apache/geronimo/network/protocol/SocketProtocolStressTest.java
   geronimo/trunk/modules/network/src/test/org/apache/geronimo/network/protocol/TestCountingProtocol.java
Log:
Simplification

Modified: geronimo/trunk/modules/network/src/test/org/apache/geronimo/network/protocol/SocketProtocolStressTest.java
==============================================================================
--- geronimo/trunk/modules/network/src/test/org/apache/geronimo/network/protocol/SocketProtocolStressTest.java
(original)
+++ geronimo/trunk/modules/network/src/test/org/apache/geronimo/network/protocol/SocketProtocolStressTest.java
Thu Oct 21 15:24:46 2004
@@ -54,8 +54,6 @@
     }
 
     public void testSimple() throws Exception {
-        simpleCounter.setCompleted(simpleCompleted = new CountDown(MESSAGE_COUNT));
-
         for (int i = 0; i < MESSAGE_COUNT; i++) {
             sp.sendDown(allocateDownPacket());
         }
@@ -69,8 +67,6 @@
 
         final CyclicBarrier barrier = new CyclicBarrier(WORKERS);
 
-        concurrentCounter.setCompleted(concurrentCompleted = new CountDown(WORKERS * MESSAGE_COUNT));
-
         for (int i = 0; i < WORKERS; i++) {
 
             new Thread() {
@@ -149,8 +145,8 @@
             }
         });
 
-        aps.push(simpleCounter = new TestCountingProtocol(new CountDown(MESSAGE_COUNT)));
-        aps.push(concurrentCounter = new TestCountingProtocol(new CountDown(WORKERS * MESSAGE_COUNT)));
+        aps.push(simpleCounter = new TestCountingProtocol(simpleCompleted =  new CountDown(MESSAGE_COUNT)));
+        aps.push(concurrentCounter = new TestCountingProtocol(concurrentCompleted = new CountDown(WORKERS
* MESSAGE_COUNT)));
 
         aps.push(new AbstractProtocol() {
             public void setup() {

Modified: geronimo/trunk/modules/network/src/test/org/apache/geronimo/network/protocol/TestCountingProtocol.java
==============================================================================
--- geronimo/trunk/modules/network/src/test/org/apache/geronimo/network/protocol/TestCountingProtocol.java
(original)
+++ geronimo/trunk/modules/network/src/test/org/apache/geronimo/network/protocol/TestCountingProtocol.java
Thu Oct 21 15:24:46 2004
@@ -32,10 +32,6 @@
         this.completed = completed;
     }
 
-    public void setCompleted(CountDown completed) {
-        this.completed = completed;
-    }
-
     public void setup() throws ProtocolException {
     }
 

Mime
View raw message