Skip to content

Commit e315a98

Browse files
committed
improve tests
1 parent ffd62cc commit e315a98

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/test/java/org/apache/commons/io/input/QueueInputStreamTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
import static org.junit.jupiter.api.Assertions.assertThrows;
2323
import static org.junit.jupiter.api.Assertions.assertTimeout;
2424
import static org.junit.jupiter.api.Assertions.assertTrue;
25-
import static org.junit.jupiter.api.Assumptions.assumeTrue;
25+
import static org.junit.jupiter.api.Assertions.fail;
26+
import static org.junit.jupiter.api.Assumptions.assumeFalse;
2627
import static org.junit.jupiter.api.DynamicTest.dynamicTest;
2728

2829
import java.io.BufferedInputStream;
@@ -216,7 +217,7 @@ public void testBulkReadZeroLength() {
216217
@ParameterizedTest(name = "inputData={0}")
217218
@MethodSource("inputData")
218219
public void testBulkReadWaiting(final String inputData) throws IOException {
219-
assumeTrue(!inputData.isEmpty());
220+
assumeFalse(inputData.isEmpty());
220221

221222
final CountDownLatch onPollLatch = new CountDownLatch(1);
222223
final CountDownLatch afterWriteLatch = new CountDownLatch(1);
@@ -242,7 +243,7 @@ public Integer poll(final long timeout, final TimeUnit unit) throws InterruptedE
242243
queueOutputStream.write(inputData.getBytes(StandardCharsets.UTF_8));
243244
afterWriteLatch.countDown();
244245
} catch (final Exception e) {
245-
throw new RuntimeException(e);
246+
fail("Unexpected exception", e);
246247
}
247248
});
248249

0 commit comments

Comments
 (0)