[cvs] / jsr166 / src / test / tck / AbstractQueuedLongSynchronizerTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/AbstractQueuedLongSynchronizerTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8