16 |
|
import java.util.concurrent.locks.AbstractQueuedLongSynchronizer; |
17 |
|
import java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject; |
18 |
|
|
19 |
– |
import junit.framework.AssertionFailedError; |
19 |
|
import junit.framework.Test; |
20 |
|
import junit.framework.TestSuite; |
21 |
|
|
140 |
|
long startTime = System.nanoTime(); |
141 |
|
while (!sync.isQueued(t)) { |
142 |
|
if (millisElapsedSince(startTime) > LONG_DELAY_MS) |
143 |
< |
throw new AssertionFailedError("timed out"); |
143 |
> |
throw new AssertionError("timed out"); |
144 |
|
Thread.yield(); |
145 |
|
} |
146 |
|
assertTrue(t.isAlive()); |