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

Comparing jsr166/src/test/tck/ReentrantReadWriteLockTest.java (file contents):
Revision 1.38 by jsr166, Sat Nov 21 21:59:50 2009 UTC vs.
Revision 1.41 by jsr166, Wed Aug 25 00:07:03 2010 UTC

# Line 15 | Line 15 | import java.util.*;
15  
16   public class ReentrantReadWriteLockTest extends JSR166TestCase {
17      public static void main(String[] args) {
18 <        junit.textui.TestRunner.run (suite());
18 >        junit.textui.TestRunner.run(suite());
19      }
20      public static Test suite() {
21          return new TestSuite(ReentrantReadWriteLockTest.class);
# Line 252 | Line 252 | public class ReentrantReadWriteLockTest
252          lock.writeLock().lock();
253          Thread t = new Thread(new CheckedInterruptedRunnable() {
254              public void realRun() throws InterruptedException {
255 <                lock.readLock().tryLock(1000,MILLISECONDS);
255 >                lock.readLock().tryLock(LONG_DELAY_MS, MILLISECONDS);
256              }});
257  
258          t.start();
259 +        Thread.sleep(SHORT_DELAY_MS);
260          t.interrupt();
261          t.join();
262      }
# Line 898 | Line 899 | public class ReentrantReadWriteLockTest
899          Thread t = new Thread(new CheckedInterruptedRunnable() {
900              public void realRun() throws InterruptedException {
901                  lock.writeLock().lock();
902 <                c.awaitNanos(SHORT_DELAY_MS * 2 * 1000000);
902 >                c.awaitNanos(MILLISECONDS.toNanos(LONG_DELAY_MS));
903                  lock.writeLock().unlock();
904              }});
905  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines