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

Comparing jsr166/src/test/tck/StampedLockTest.java (file contents):
Revision 1.6 by dl, Thu Mar 21 19:06:54 2013 UTC vs.
Revision 1.7 by jsr166, Fri Mar 22 16:10:19 2013 UTC

# Line 292 | Line 292 | public class StampedLockTest extends JSR
292                  running.countDown();
293                  lock.writeLockInterruptibly();
294              }});
295 <        try {
296 <            running.await();
295 >        try {
296 >            running.await();
297              waitForThreadToEnterWaitState(t, 100);
298              t.interrupt();
299              awaitTermination(t);
# Line 315 | Line 315 | public class StampedLockTest extends JSR
315                  running.countDown();
316                  lock.tryWriteLock(2 * LONG_DELAY_MS, MILLISECONDS);
317              }});
318 <        try {
318 >        try {
319              running.await();
320              waitForThreadToEnterWaitState(t, 100);
321              t.interrupt();
# Line 338 | Line 338 | public class StampedLockTest extends JSR
338                  running.countDown();
339                  lock.readLockInterruptibly();
340              }});
341 <        try {
342 <            running.await();
341 >        try {
342 >            running.await();
343              waitForThreadToEnterWaitState(t, 100);
344              t.interrupt();
345              awaitTermination(t);
# Line 361 | Line 361 | public class StampedLockTest extends JSR
361                  running.countDown();
362                  lock.tryReadLock(2 * LONG_DELAY_MS, MILLISECONDS);
363              }});
364 <        try {
365 <            running.await();
364 >        try {
365 >            running.await();
366              waitForThreadToEnterWaitState(t, 100);
367              t.interrupt();
368              awaitTermination(t);
# Line 452 | Line 452 | public class StampedLockTest extends JSR
452                  long s = lock.writeLock();
453                  lock.unlockWrite(s);
454              }});
455 <        try {
456 <            running.await();
455 >        try {
456 >            running.await();
457              waitForThreadToEnterWaitState(t, 100);
458              assertFalse(lock.isWriteLocked());
459              lock.unlockRead(rs);
# Line 576 | Line 576 | public class StampedLockTest extends JSR
576                  assertEquals(rs, 0L);
577                  assertTrue(millisElapsedSince(startTime) >= timeoutMillis);
578              }});
579 <        
579 >
580          awaitTermination(t);
581          assertTrue(lock.isWriteLocked());
582          lock.unlockWrite(s);
# Line 600 | Line 600 | public class StampedLockTest extends JSR
600                  lock.writeLockInterruptibly();
601              }});
602  
603 <        try {
604 <            running.await();
603 >        try {
604 >            running.await();
605              waitForThreadToEnterWaitState(t, 100);
606              t.interrupt();
607              assertTrue(lock.isWriteLocked());
# Line 632 | Line 632 | public class StampedLockTest extends JSR
632                  running.countDown();
633                  lock.readLockInterruptibly();
634              }});
635 <        try {
635 >        try {
636              running.await();
637              waitForThreadToEnterWaitState(t, 100);
638              t.interrupt();
# Line 743 | Line 743 | public class StampedLockTest extends JSR
743                      running.countDown();
744                      lock.writeLockInterruptibly();
745                  }});
746 <        try {
746 >        try {
747              running.await();
748              assertFalse(lock.validate(p));
749              assertFalse((p = lock.tryOptimisticRead()) != 0L);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines