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

Comparing jsr166/src/test/tck/ReentrantLockTest.java (file contents):
Revision 1.31 by jsr166, Sat Nov 21 02:33:20 2009 UTC vs.
Revision 1.35 by jsr166, Tue Dec 1 23:16:23 2009 UTC

# Line 56 | Line 56 | public class ReentrantLockTest extends J
56          public Collection<Thread> getWaitingThreads(Condition c) {
57              return super.getWaitingThreads(c);
58          }
59
60
59      }
60  
61      /**
# Line 270 | Line 268 | public class ReentrantLockTest extends J
268              }});
269  
270          t.start();
271 +        Thread.sleep(SHORT_DELAY_MS);
272          t.interrupt();
273          t.join();
274      }
# Line 370 | Line 369 | public class ReentrantLockTest extends J
369          lock.lockInterruptibly();
370          Thread t = new Thread(new InterruptedLockRunnable(lock));
371          t.start();
372 +        Thread.sleep(SHORT_DELAY_MS);
373          t.interrupt();
374          assertTrue(lock.isLocked());
375          assertTrue(lock.isHeldByCurrentThread());
# Line 774 | Line 774 | public class ReentrantLockTest extends J
774          Thread t = new Thread(new CheckedInterruptedRunnable() {
775              public void realRun() throws InterruptedException {
776                  lock.lock();
777 <                c.awaitNanos(1000 * 1000 * 1000); // 1 sec
777 >                c.awaitNanos(MILLISECONDS.toNanos(LONG_DELAY_MS));
778              }});
779  
780          t.start();
# Line 887 | Line 887 | public class ReentrantLockTest extends J
887              new ObjectOutputStream(new BufferedOutputStream(bout));
888          out.writeObject(l);
889          out.close();
890 <        
890 >
891          ByteArrayInputStream bin =
892              new ByteArrayInputStream(bout.toByteArray());
893          ObjectInputStream in =

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines