1 |
|
/* |
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 |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
* Other contributors include Andrew Wright, Jeffrey Hayes, |
6 |
|
* Pat Fisher, Mike Judd. |
7 |
|
*/ |
66 |
|
|
67 |
|
t.start(); |
68 |
|
assertEquals(l.getCount(), 2); |
69 |
< |
Thread.sleep(SHORT_DELAY_MS); |
69 |
> |
delay(SHORT_DELAY_MS); |
70 |
|
l.countDown(); |
71 |
|
assertEquals(l.getCount(), 1); |
72 |
|
l.countDown(); |
89 |
|
|
90 |
|
t.start(); |
91 |
|
assertEquals(l.getCount(), 2); |
92 |
< |
Thread.sleep(SHORT_DELAY_MS); |
92 |
> |
delay(SHORT_DELAY_MS); |
93 |
|
l.countDown(); |
94 |
|
assertEquals(l.getCount(), 1); |
95 |
|
l.countDown(); |
126 |
|
}}); |
127 |
|
|
128 |
|
t.start(); |
129 |
< |
Thread.sleep(SHORT_DELAY_MS); |
129 |
> |
delay(SHORT_DELAY_MS); |
130 |
|
assertEquals(l.getCount(), 1); |
131 |
|
t.interrupt(); |
132 |
|
t.join(); |