59 |
|
|
60 |
|
Thread t = new Thread(new CheckedRunnable() { |
61 |
|
public void realRun() throws InterruptedException { |
62 |
< |
threadAssertTrue(l.getCount() > 0); |
62 |
> |
assertTrue(l.getCount() > 0); |
63 |
|
l.await(); |
64 |
< |
threadAssertTrue(l.getCount() == 0); |
64 |
> |
assertEquals(0, l.getCount()); |
65 |
|
}}); |
66 |
|
|
67 |
|
t.start(); |
83 |
|
|
84 |
|
Thread t = new Thread(new CheckedRunnable() { |
85 |
|
public void realRun() throws InterruptedException { |
86 |
< |
threadAssertTrue(l.getCount() > 0); |
87 |
< |
threadAssertTrue(l.await(SMALL_DELAY_MS, MILLISECONDS)); |
86 |
> |
assertTrue(l.getCount() > 0); |
87 |
> |
assertTrue(l.await(SMALL_DELAY_MS, MILLISECONDS)); |
88 |
|
}}); |
89 |
|
|
90 |
|
t.start(); |
104 |
|
final CountDownLatch l = new CountDownLatch(1); |
105 |
|
Thread t = new Thread(new CheckedInterruptedRunnable() { |
106 |
|
public void realRun() throws InterruptedException { |
107 |
< |
threadAssertTrue(l.getCount() > 0); |
107 |
> |
assertTrue(l.getCount() > 0); |
108 |
|
l.await(); |
109 |
|
}}); |
110 |
|
|
121 |
|
final CountDownLatch l = new CountDownLatch(1); |
122 |
|
Thread t = new Thread(new CheckedInterruptedRunnable() { |
123 |
|
public void realRun() throws InterruptedException { |
124 |
< |
threadAssertTrue(l.getCount() > 0); |
124 |
> |
assertTrue(l.getCount() > 0); |
125 |
|
l.await(MEDIUM_DELAY_MS, MILLISECONDS); |
126 |
|
}}); |
127 |
|
|
139 |
|
final CountDownLatch l = new CountDownLatch(1); |
140 |
|
Thread t = new Thread(new CheckedRunnable() { |
141 |
|
public void realRun() throws InterruptedException { |
142 |
< |
threadAssertTrue(l.getCount() > 0); |
143 |
< |
threadAssertFalse(l.await(SHORT_DELAY_MS, MILLISECONDS)); |
144 |
< |
threadAssertTrue(l.getCount() > 0); |
142 |
> |
assertTrue(l.getCount() > 0); |
143 |
> |
assertFalse(l.await(SHORT_DELAY_MS, MILLISECONDS)); |
144 |
> |
assertTrue(l.getCount() > 0); |
145 |
|
}}); |
146 |
|
|
147 |
|
t.start(); |