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

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

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

revision 1.31, Sat Nov 21 17:54:04 2009 UTC revision 1.32, Mon Nov 30 08:31:09 2009 UTC
# Line 327  Line 327 
327          sync.acquire(1);          sync.acquire(1);
328          Thread t = new Thread(new CheckedInterruptedRunnable() {          Thread t = new Thread(new CheckedInterruptedRunnable() {
329              public void realRun() throws InterruptedException {              public void realRun() throws InterruptedException {
330                  sync.tryAcquireNanos(1, MEDIUM_DELAY_MS * 1000 * 1000);                  sync.tryAcquireNanos(1, MEDIUM_DELAY_MS * 1000L * 1000L);
331              }});              }});
332    
333          t.start();          t.start();
334            Thread.sleep(SHORT_DELAY_MS);
335          t.interrupt();          t.interrupt();
336          t.join();          t.join();
337      }      }
# Line 360  Line 361 
361          sync.acquire(1);          sync.acquire(1);
362          Thread t = new Thread(new CheckedRunnable() {          Thread t = new Thread(new CheckedRunnable() {
363              public void realRun() throws InterruptedException {              public void realRun() throws InterruptedException {
364                  threadAssertFalse(sync.tryAcquireNanos(1, 1000 * 1000));                  threadAssertFalse(sync.tryAcquireNanos(1, SHORT_DELAY_MS * 1000L * 1000L));
365              }});              }});
366    
367          t.start();          t.start();
# Line 417  Line 418 
418          sync.acquireInterruptibly(1);          sync.acquireInterruptibly(1);
419          Thread t = new Thread(new InterruptedSyncRunnable(sync));          Thread t = new Thread(new InterruptedSyncRunnable(sync));
420          t.start();          t.start();
421            Thread.sleep(SHORT_DELAY_MS);
422          t.interrupt();          t.interrupt();
423          assertTrue(sync.isHeldExclusively());          assertTrue(sync.isHeldExclusively());
424          t.join();          t.join();
# Line 804  Line 806 
806          Thread t = new Thread(new CheckedInterruptedRunnable() {          Thread t = new Thread(new CheckedInterruptedRunnable() {
807              public void realRun() throws InterruptedException {              public void realRun() throws InterruptedException {
808                  sync.acquire(1);                  sync.acquire(1);
809                  c.awaitNanos(1000 * 1000 * 1000); // 1 sec                  c.awaitNanos(LONG_DELAY_MS * 1000L * 1000L);
810              }});              }});
811    
812          t.start();          t.start();
# Line 952  Line 954 
954          Thread t = new Thread(new CheckedRunnable() {          Thread t = new Thread(new CheckedRunnable() {
955              public void realRun() throws InterruptedException {              public void realRun() throws InterruptedException {
956                  threadAssertFalse(l.isSignalled());                  threadAssertFalse(l.isSignalled());
957                  threadAssertTrue(l.tryAcquireSharedNanos(0, MEDIUM_DELAY_MS* 1000 * 1000));                  threadAssertTrue(l.tryAcquireSharedNanos(0, MEDIUM_DELAY_MS * 1000L * 1000L));
958                  threadAssertTrue(l.isSignalled());                  threadAssertTrue(l.isSignalled());
959              }});              }});
960    
# Line 989  Line 991 
991          Thread t = new Thread(new CheckedInterruptedRunnable() {          Thread t = new Thread(new CheckedInterruptedRunnable() {
992              public void realRun() throws InterruptedException {              public void realRun() throws InterruptedException {
993                  threadAssertFalse(l.isSignalled());                  threadAssertFalse(l.isSignalled());
994                  l.tryAcquireSharedNanos(0, SMALL_DELAY_MS* 1000 * 1000);                  l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000L * 1000L);
995              }});              }});
996    
997          t.start();          t.start();
# Line 1007  Line 1009 
1009          Thread t = new Thread(new CheckedRunnable() {          Thread t = new Thread(new CheckedRunnable() {
1010              public void realRun() throws InterruptedException {              public void realRun() throws InterruptedException {
1011                  threadAssertFalse(l.isSignalled());                  threadAssertFalse(l.isSignalled());
1012                  threadAssertFalse(l.tryAcquireSharedNanos(0, SMALL_DELAY_MS* 1000 * 1000));                  threadAssertFalse(l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000L * 1000L));
1013              }});              }});
1014    
1015          t.start();          t.start();

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8