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.11 by jsr166, Sat Nov 21 02:07:26 2009 UTC vs.
Revision 1.13 by jsr166, Sat Nov 21 17:54:04 2009 UTC

# Line 10 | Line 10
10   import junit.framework.*;
11   import java.util.*;
12   import java.util.concurrent.*;
13 + import static java.util.concurrent.TimeUnit.MILLISECONDS;
14   import java.util.concurrent.locks.*;
15   import java.io.*;
16  
# Line 477 | Line 478 | public class AbstractQueuedLongSynchroni
478          final Mutex sync = new Mutex();
479          final AbstractQueuedLongSynchronizer.ConditionObject c = sync.newCondition();
480          sync.acquire(1);
481 <        assertFalse(c.await(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));
481 >        assertFalse(c.await(SHORT_DELAY_MS, MILLISECONDS));
482          sync.release(1);
483      }
484  
# Line 787 | Line 788 | public class AbstractQueuedLongSynchroni
788              public void realRun() throws InterruptedException {
789                  sync.acquire(1);
790                  c.await();
790                sync.release(1);
791              }});
792  
793          t.start();
# Line 807 | Line 807 | public class AbstractQueuedLongSynchroni
807              public void realRun() throws InterruptedException {
808                  sync.acquire(1);
809                  c.awaitNanos(1000 * 1000 * 1000); // 1 sec
810                sync.release(1);
810              }});
811  
812          t.start();
# Line 828 | Line 827 | public class AbstractQueuedLongSynchroni
827                  sync.acquire(1);
828                  java.util.Date d = new java.util.Date();
829                  c.awaitUntil(new java.util.Date(d.getTime() + 10000));
831                sync.release(1);
830              }});
831  
832          t.start();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines