--- old/test/jdk/java/util/concurrent/tck/StampedLockTest.java 2021-01-09 11:36:22.340729915 -0800 +++ new/test/jdk/java/util/concurrent/tck/StampedLockTest.java 2021-01-09 11:36:22.040732275 -0800 @@ -370,7 +370,7 @@ */ public void testInterruptibleOperationsThrowInterruptedExceptionWriteLockedInterrupted() { final StampedLock lock = new StampedLock(); - long s = lock.writeLock(); + long stamp = lock.writeLock(); Action[] interruptibleLockBlockingActions = { () -> lock.writeLockInterruptibly(), @@ -385,6 +385,8 @@ shuffle(interruptibleLockBlockingActions); assertThrowInterruptedExceptionWhenInterrupted(interruptibleLockBlockingActions); + + releaseWriteLock(lock, stamp); } /** @@ -392,7 +394,7 @@ */ public void testInterruptibleOperationsThrowInterruptedExceptionReadLockedInterrupted() { final StampedLock lock = new StampedLock(); - long s = lock.readLock(); + long stamp = lock.readLock(); Action[] interruptibleLockBlockingActions = { () -> lock.writeLockInterruptibly(), @@ -403,6 +405,8 @@ shuffle(interruptibleLockBlockingActions); assertThrowInterruptedExceptionWhenInterrupted(interruptibleLockBlockingActions); + + releaseReadLock(lock, stamp); } /** @@ -726,6 +730,7 @@ lock.unlockWrite(s); s = lock.readLock(); assertTrue(lock.toString().contains("Read-locks")); + releaseReadLock(lock, s); } /**