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

Comparing jsr166/src/test/tck/AbstractQueuedLongSynchronizerTest.java (file contents):
Revision 1.13 by jsr166, Sat Nov 21 17:54:04 2009 UTC vs.
Revision 1.14 by jsr166, Mon Nov 30 08:31:09 2009 UTC

# Line 330 | Line 330 | public class AbstractQueuedLongSynchroni
330          sync.acquire(1);
331          Thread t = new Thread(new CheckedInterruptedRunnable() {
332              public void realRun() throws InterruptedException {
333 <                sync.tryAcquireNanos(1, MEDIUM_DELAY_MS * 1000 * 1000);
333 >                sync.tryAcquireNanos(1, MEDIUM_DELAY_MS * 1000L * 1000L);
334              }});
335  
336          t.start();
337 +        Thread.sleep(SHORT_DELAY_MS);
338          t.interrupt();
339          t.join();
340      }
# Line 363 | Line 364 | public class AbstractQueuedLongSynchroni
364          sync.acquire(1);
365          Thread t = new Thread(new CheckedRunnable() {
366              public void realRun() throws InterruptedException {
367 <                threadAssertFalse(sync.tryAcquireNanos(1, 1000 * 1000));
367 >                threadAssertFalse(sync.tryAcquireNanos(1, SHORT_DELAY_MS * 1000L * 1000L));
368              }});
369  
370          t.start();
# Line 419 | Line 420 | public class AbstractQueuedLongSynchroni
420          sync.acquireInterruptibly(1);
421          Thread t = new Thread(new InterruptedSyncRunnable(sync));
422          t.start();
423 +        Thread.sleep(SHORT_DELAY_MS);
424          t.interrupt();
425          assertTrue(sync.isHeldExclusively());
426          t.join();
# Line 806 | Line 808 | public class AbstractQueuedLongSynchroni
808          Thread t = new Thread(new CheckedInterruptedRunnable() {
809              public void realRun() throws InterruptedException {
810                  sync.acquire(1);
811 <                c.awaitNanos(1000 * 1000 * 1000); // 1 sec
811 >                c.awaitNanos(LONG_DELAY_MS * 1000L * 1000L);
812              }});
813  
814          t.start();
# Line 954 | Line 956 | public class AbstractQueuedLongSynchroni
956          Thread t = new Thread(new CheckedRunnable() {
957              public void realRun() throws InterruptedException {
958                  threadAssertFalse(l.isSignalled());
959 <                threadAssertTrue(l.tryAcquireSharedNanos(0, MEDIUM_DELAY_MS* 1000 * 1000));
959 >                threadAssertTrue(l.tryAcquireSharedNanos(0, MEDIUM_DELAY_MS * 1000L * 1000L));
960                  threadAssertTrue(l.isSignalled());
961              }});
962  
# Line 991 | Line 993 | public class AbstractQueuedLongSynchroni
993          Thread t = new Thread(new CheckedInterruptedRunnable() {
994              public void realRun() throws InterruptedException {
995                  threadAssertFalse(l.isSignalled());
996 <                l.tryAcquireSharedNanos(0, SMALL_DELAY_MS* 1000 * 1000);
996 >                l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000L * 1000L);
997              }});
998  
999          t.start();
# Line 1009 | Line 1011 | public class AbstractQueuedLongSynchroni
1011          Thread t = new Thread(new CheckedRunnable() {
1012              public void realRun() throws InterruptedException {
1013                  threadAssertFalse(l.isSignalled());
1014 <                threadAssertFalse(l.tryAcquireSharedNanos(0, SMALL_DELAY_MS* 1000 * 1000));
1014 >                threadAssertFalse(l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000L * 1000L));
1015              }});
1016  
1017          t.start();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines