From: kkolinko Date: Wed, 28 Sep 2011 21:03:09 +0000 (+0000) Subject: Improve TestNonBlockingCoordinator: X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=db483771ce16a967e59a31ab0671f134f1ff3c26;p=tomcat7.0 Improve TestNonBlockingCoordinator: - Format code for better readbility. - In testCoord1() change how equality is tested. Read expected value from 0th member, instead of (i-1)th. They all should be the same. - Remove unneeded main() method. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1177060 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java b/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java index 3ce3a4bb4..7f5a30b1e 100644 --- a/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java +++ b/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java @@ -30,15 +30,14 @@ public class TestNonBlockingCoordinator { private GroupChannel[] channels = null; private NonBlockingCoordinator[] coordinators = null; - private int channelCount = 10; - private Thread[] threads = null; + private final int channelCount = 10; @Before public void setUp() throws Exception { System.out.println("Setup"); channels = new GroupChannel[channelCount]; coordinators = new NonBlockingCoordinator[channelCount]; - threads = new Thread[channelCount]; + Thread[] threads = new Thread[channelCount]; for ( int i=0; i