ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java
(Generate patch)

Comparing jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java (file contents):
Revision 1.29 by jsr166, Sat Nov 21 02:07:26 2009 UTC vs.
Revision 1.31 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 475 | Line 476 | public class AbstractQueuedSynchronizerT
476          final Mutex sync = new Mutex();
477          final AbstractQueuedSynchronizer.ConditionObject c = sync.newCondition();
478          sync.acquire(1);
479 <        assertFalse(c.await(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));
479 >        assertFalse(c.await(SHORT_DELAY_MS, MILLISECONDS));
480          sync.release(1);
481      }
482  
# Line 785 | Line 786 | public class AbstractQueuedSynchronizerT
786              public void realRun() throws InterruptedException {
787                  sync.acquire(1);
788                  c.await();
788                sync.release(1);
789              }});
790  
791          t.start();
# Line 805 | Line 805 | public class AbstractQueuedSynchronizerT
805              public void realRun() throws InterruptedException {
806                  sync.acquire(1);
807                  c.awaitNanos(1000 * 1000 * 1000); // 1 sec
808                sync.release(1);
808              }});
809  
810          t.start();
# Line 826 | Line 825 | public class AbstractQueuedSynchronizerT
825                  sync.acquire(1);
826                  java.util.Date d = new java.util.Date();
827                  c.awaitUntil(new java.util.Date(d.getTime() + 10000));
829                sync.release(1);
828              }});
829  
830          t.start();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines