[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.32, Mon Nov 30 08:31:09 2009 UTC revision 1.33, Tue Dec 1 06:03:49 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 * 1000L * 1000L);                  sync.tryAcquireNanos(1, MILLISECONDS.toNanos(MEDIUM_DELAY_MS));
331              }});              }});
332    
333          t.start();          t.start();
# Line 361  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, SHORT_DELAY_MS * 1000L * 1000L));                  long nanos = MILLISECONDS.toNanos(SHORT_DELAY_MS);
365                    assertFalse(sync.tryAcquireNanos(1, nanos));
366              }});              }});
367    
368          t.start();          t.start();
# Line 806  Line 807 
807          Thread t = new Thread(new CheckedInterruptedRunnable() {          Thread t = new Thread(new CheckedInterruptedRunnable() {
808              public void realRun() throws InterruptedException {              public void realRun() throws InterruptedException {
809                  sync.acquire(1);                  sync.acquire(1);
810                  c.awaitNanos(LONG_DELAY_MS * 1000L * 1000L);                  c.awaitNanos(MILLISECONDS.toNanos(LONG_DELAY_MS));
811              }});              }});
812    
813          t.start();          t.start();
# Line 953  Line 954 
954    
955          Thread t = new Thread(new CheckedRunnable() {          Thread t = new Thread(new CheckedRunnable() {
956              public void realRun() throws InterruptedException {              public void realRun() throws InterruptedException {
957                  threadAssertFalse(l.isSignalled());                  assertFalse(l.isSignalled());
958                  threadAssertTrue(l.tryAcquireSharedNanos(0, MEDIUM_DELAY_MS * 1000L * 1000L));                  long nanos = MILLISECONDS.toNanos(MEDIUM_DELAY_MS);
959                  threadAssertTrue(l.isSignalled());                  assertTrue(l.tryAcquireSharedNanos(0, nanos));
960                    assertTrue(l.isSignalled());
961              }});              }});
962    
963          t.start();          t.start();
# Line 990  Line 992 
992          final BooleanLatch l = new BooleanLatch();          final BooleanLatch l = new BooleanLatch();
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());                  assertFalse(l.isSignalled());
996                  l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000L * 1000L);                  long nanos = MILLISECONDS.toNanos(SMALL_DELAY_MS);
997                    l.tryAcquireSharedNanos(0, nanos);
998              }});              }});
999    
1000          t.start();          t.start();
# Line 1008  Line 1011 
1011          final BooleanLatch l = new BooleanLatch();          final BooleanLatch l = new BooleanLatch();
1012          Thread t = new Thread(new CheckedRunnable() {          Thread t = new Thread(new CheckedRunnable() {
1013              public void realRun() throws InterruptedException {              public void realRun() throws InterruptedException {
1014                  threadAssertFalse(l.isSignalled());                  assertFalse(l.isSignalled());
1015                  threadAssertFalse(l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000L * 1000L));                  long nanos = MILLISECONDS.toNanos(SMALL_DELAY_MS);
1016                    assertFalse(l.tryAcquireSharedNanos(0, nanos));
1017              }});              }});
1018    
1019          t.start();          t.start();

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

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8