diff options
author | Gary Gregory <gardgregory@gmail.com> | 2022-09-17 20:22:47 -0400 |
---|---|---|
committer | Gary Gregory <gardgregory@gmail.com> | 2022-09-17 20:22:47 -0400 |
commit | f46c153a8b8194c7674cb975b86a6f1696189317 (patch) | |
tree | 4d88ee206852e22b0d35bb3b5770c114b59189ba /src/test | |
parent | be656d35fc0e248a14248ac47857bb7b2bbfd5fc (diff) | |
download | apache-commons-io-f46c153a8b8194c7674cb975b86a6f1696189317.tar.gz |
Revert "Make this test more reliable based on a failure seen on GitHub."
This reverts commit be656d35fc0e248a14248ac47857bb7b2bbfd5fc.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/apache/commons/io/FileUtilsWaitForTest.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/test/java/org/apache/commons/io/FileUtilsWaitForTest.java b/src/test/java/org/apache/commons/io/FileUtilsWaitForTest.java index a5f6a0f1..50af4a2f 100644 --- a/src/test/java/org/apache/commons/io/FileUtilsWaitForTest.java +++ b/src/test/java/org/apache/commons/io/FileUtilsWaitForTest.java @@ -44,15 +44,13 @@ public class FileUtilsWaitForTest { @Test public void testWaitForInterrupted() throws InterruptedException { final AtomicBoolean wasInterrupted = new AtomicBoolean(); - final CountDownLatch started = new CountDownLatch(2); - final int seconds = 10; + final CountDownLatch started = new CountDownLatch(1); final Thread thread1 = new Thread(() -> { started.countDown(); - assertTrue(FileUtils.waitFor(FileUtils.current(), seconds)); + assertTrue(FileUtils.waitFor(FileUtils.current(), 10)); wasInterrupted.set(Thread.currentThread().isInterrupted()); }); thread1.start(); - started.countDown(); thread1.interrupt(); started.await(); thread1.join(); |