ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/LockSupportTest.java
(Generate patch)

Comparing jsr166/src/test/tck/LockSupportTest.java (file contents):
Revision 1.19 by dl, Fri May 6 11:22:07 2011 UTC vs.
Revision 1.21 by jsr166, Fri May 6 17:59:36 2011 UTC

# Line 332 | Line 332 | public class LockSupportTest extends JSR
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   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines