ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/CyclicBarrierTest.java
(Generate patch)

Comparing jsr166/src/test/tck/CyclicBarrierTest.java (file contents):
Revision 1.17 by jsr166, Tue Mar 15 19:47:06 2011 UTC vs.
Revision 1.19 by jsr166, Sun May 15 16:56:41 2011 UTC

# Line 120 | Line 120 | public class CyclicBarrierTest extends J
120  
121          t1.start();
122          t2.start();
123 <        Thread.sleep(SHORT_DELAY_MS);
123 >        delay(SHORT_DELAY_MS);
124          t1.interrupt();
125          t1.join();
126          t2.join();
# Line 143 | Line 143 | public class CyclicBarrierTest extends J
143  
144          t1.start();
145          t2.start();
146 <        Thread.sleep(SHORT_DELAY_MS);
146 >        delay(SHORT_DELAY_MS);
147          t1.interrupt();
148          t1.join();
149          t2.join();
# Line 152 | Line 152 | public class CyclicBarrierTest extends J
152      /**
153       * A timeout in timed await throws TimeoutException
154       */
155 <    public void testAwait3_TimeOutException() throws InterruptedException {
155 >    public void testAwait3_TimeoutException() throws InterruptedException {
156          final CyclicBarrier c = new CyclicBarrier(2);
157          Thread t = new ThreadShouldThrow(TimeoutException.class) {
158              public void realRun() throws Exception {
# Line 222 | Line 222 | public class CyclicBarrierTest extends J
222  
223          t1.start();
224          t2.start();
225 <        Thread.sleep(SHORT_DELAY_MS);
225 >        delay(SHORT_DELAY_MS);
226          c.reset();
227          t1.join();
228          t2.join();
# Line 277 | Line 277 | public class CyclicBarrierTest extends J
277  
278          t.start();
279          for (int i = 0; i < 4; i++) {
280 <            Thread.sleep(SHORT_DELAY_MS);
280 >            delay(SHORT_DELAY_MS);
281              t.interrupt();
282          }
283          done.set(true);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines