332 |
|
} |
333 |
|
|
334 |
|
/** |
335 |
< |
* parkUntil(0) returns immediately |
335 |
> |
* getBlocker(null) throws NullPointerException |
336 |
> |
*/ |
337 |
> |
public void testGetBlockerNull() { |
338 |
> |
try { |
339 |
> |
LockSupport.getBlocker(null); |
340 |
> |
shouldThrow(); |
341 |
> |
} catch (NullPointerException success) {} |
342 |
> |
} |
343 |
> |
|
344 |
> |
/** |
345 |
> |
* parkUntil(0) returns immediately. |
346 |
> |
* |
347 |
|
* Requires hotspot fix for: |
348 |
|
* 6763959 java.util.concurrent.locks.LockSupport.parkUntil(0) blocks forever |
349 |
+ |
* which is in jdk7-b118 and 6u25. |
350 |
|
*/ |
351 |
< |
public void XXXXtestParkUntil0Returns() throws InterruptedException { |
351 |
> |
public void testParkUntil0Returns() throws InterruptedException { |
352 |
|
Thread t = newStartedThread(new CheckedRunnable() { |
353 |
|
public void realRun() { |
354 |
|
LockSupport.parkUntil(0L); |
355 |
|
}}); |
356 |
|
|
357 |
< |
awaitTermination(t, MEDIUM_DELAY_MS); |
357 |
> |
awaitTermination(t); |
358 |
|
} |
359 |
|
} |