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.15 by jsr166, Wed Aug 25 00:07:03 2010 UTC vs.
Revision 1.16 by jsr166, Mon Oct 11 05:43:00 2010 UTC

# Line 355 | Line 355 | public class CyclicBarrierTest extends J
355       * Reset of a barrier after timeout reinitializes it.
356       */
357      public void testResetAfterTimeout() throws Exception {
358 <        final CyclicBarrier start = new CyclicBarrier(3);
358 >        final CyclicBarrier start = new CyclicBarrier(2);
359          final CyclicBarrier barrier = new CyclicBarrier(3);
360          for (int i = 0; i < 2; i++) {
361              Thread t1 = new ThreadShouldThrow(TimeoutException.class) {
362                      public void realRun() throws Exception {
363                          start.await();
364 <                        barrier.await(MEDIUM_DELAY_MS, MILLISECONDS);
364 >                        barrier.await(SHORT_DELAY_MS, MILLISECONDS);
365                      }};
366  
367              Thread t2 = new ThreadShouldThrow(BrokenBarrierException.class) {
# Line 372 | Line 372 | public class CyclicBarrierTest extends J
372  
373              t1.start();
374              t2.start();
375            start.await();
375              t1.join();
376              t2.join();
377              assertTrue(barrier.isBroken());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines