--- jsr166/src/test/tck/ReentrantReadWriteLockTest.java 2003/12/29 19:05:40 1.15 +++ jsr166/src/test/tck/ReentrantReadWriteLockTest.java 2004/01/07 01:02:17 1.16 @@ -156,16 +156,18 @@ public class ReentrantReadWriteLockTest */ public void testWriteLockInterruptibly_Interrupted() { final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); - lock.writeLock().lock(); Thread t = new Thread(new Runnable() { public void run() { try { lock.writeLock().lockInterruptibly(); - threadShouldThrow(); + lock.writeLock().unlock(); + lock.writeLock().lockInterruptibly(); + lock.writeLock().unlock(); } catch(InterruptedException success){} } }); try { + lock.writeLock().lock(); t.start(); t.interrupt(); lock.writeLock().unlock(); @@ -209,7 +211,6 @@ public class ReentrantReadWriteLockTest public void run() { try { lock.readLock().lockInterruptibly(); - threadShouldThrow(); } catch(InterruptedException success){} } });