1 |
|
/* |
2 |
< |
* Written by members of JCP JSR-166 Expert Group and released to the |
3 |
< |
* public domain. Use, modify, and redistribute this code in any way |
4 |
< |
* without acknowledgement. Other contributors include Andrew Wright, |
5 |
< |
* Jeffrey Hayes, Pat Fischer, Mike Judd. |
2 |
> |
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
> |
* Expert Group and released to the public domain, as explained at |
4 |
> |
* http://creativecommons.org/licenses/publicdomain |
5 |
> |
* Other contributors include Andrew Wright, Jeffrey Hayes, |
6 |
> |
* Pat Fisher, Mike Judd. |
7 |
|
*/ |
8 |
|
|
9 |
|
import junit.framework.*; |
166 |
|
Thread t1 = new Thread(new Runnable() { |
167 |
|
public void run() { |
168 |
|
try { |
169 |
< |
c.await(MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS); |
169 |
> |
c.await(LONG_DELAY_MS, TimeUnit.MILLISECONDS); |
170 |
|
threadShouldThrow(); |
171 |
|
} catch(InterruptedException success){ |
172 |
|
} catch(Exception b){ |
177 |
|
Thread t2 = new Thread(new Runnable() { |
178 |
|
public void run() { |
179 |
|
try { |
180 |
< |
c.await(MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS); |
180 |
> |
c.await(LONG_DELAY_MS, TimeUnit.MILLISECONDS); |
181 |
|
threadShouldThrow(); |
182 |
|
} catch(BrokenBarrierException success){ |
183 |
|
} catch(Exception i){ |