[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.14, Mon Nov 30 08:31:09 2009 UTC revision 1.15, Tue Dec 1 06:03:49 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 * 1000L * 1000L);                  sync.tryAcquireNanos(1, MILLISECONDS.toNanos(MEDIUM_DELAY_MS));
334              }});              }});
335    
336          t.start();          t.start();
# Line 364  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, SHORT_DELAY_MS * 1000L * 1000L));                  long nanos = MILLISECONDS.toNanos(SHORT_DELAY_MS);
368                    assertFalse(sync.tryAcquireNanos(1, nanos));
369              }});              }});
370    
371          t.start();          t.start();
# Line 808  Line 809 
809          Thread t = new Thread(new CheckedInterruptedRunnable() {          Thread t = new Thread(new CheckedInterruptedRunnable() {
810              public void realRun() throws InterruptedException {              public void realRun() throws InterruptedException {
811                  sync.acquire(1);                  sync.acquire(1);
812                  c.awaitNanos(LONG_DELAY_MS * 1000L * 1000L);                  c.awaitNanos(MILLISECONDS.toNanos(LONG_DELAY_MS));
813              }});              }});
814    
815          t.start();          t.start();
# Line 955  Line 956 
956    
957          Thread t = new Thread(new CheckedRunnable() {          Thread t = new Thread(new CheckedRunnable() {
958              public void realRun() throws InterruptedException {              public void realRun() throws InterruptedException {
959                  threadAssertFalse(l.isSignalled());                  assertFalse(l.isSignalled());
960                  threadAssertTrue(l.tryAcquireSharedNanos(0, MEDIUM_DELAY_MS * 1000L * 1000L));                  long nanos = MILLISECONDS.toNanos(MEDIUM_DELAY_MS);
961                  threadAssertTrue(l.isSignalled());                  assertTrue(l.tryAcquireSharedNanos(0, nanos));
962                    assertTrue(l.isSignalled());
963              }});              }});
964    
965          t.start();          t.start();
# Line 992  Line 994 
994          final BooleanLatch l = new BooleanLatch();          final BooleanLatch l = new BooleanLatch();
995          Thread t = new Thread(new CheckedInterruptedRunnable() {          Thread t = new Thread(new CheckedInterruptedRunnable() {
996              public void realRun() throws InterruptedException {              public void realRun() throws InterruptedException {
997                  threadAssertFalse(l.isSignalled());                  assertFalse(l.isSignalled());
998                  l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000L * 1000L);                  long nanos = MILLISECONDS.toNanos(SMALL_DELAY_MS);
999                    l.tryAcquireSharedNanos(0, nanos);
1000              }});              }});
1001    
1002          t.start();          t.start();
# Line 1010  Line 1013 
1013          final BooleanLatch l = new BooleanLatch();          final BooleanLatch l = new BooleanLatch();
1014          Thread t = new Thread(new CheckedRunnable() {          Thread t = new Thread(new CheckedRunnable() {
1015              public void realRun() throws InterruptedException {              public void realRun() throws InterruptedException {
1016                  threadAssertFalse(l.isSignalled());                  assertFalse(l.isSignalled());
1017                  threadAssertFalse(l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000L * 1000L));                  long nanos = MILLISECONDS.toNanos(SMALL_DELAY_MS);
1018                    assertFalse(l.tryAcquireSharedNanos(0, nanos));
1019              }});              }});
1020    
1021          t.start();          t.start();

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

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8