diff options
author | Dominik Stadler <centic@apache.org> | 2023-03-10 08:08:23 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2023-03-10 08:08:23 +0000 |
commit | f192c95e0f0e073ee8596f946d7a44d204bef3f4 (patch) | |
tree | 26870bf3e67a14b7a2f6debff2318b298ca6d20d /poi/src | |
parent | 85d436b601b25e9c38d29a65aff4a99276ff5cfb (diff) | |
download | poi-f192c95e0f0e073ee8596f946d7a44d204bef3f4.tar.gz poi-f192c95e0f0e073ee8596f946d7a44d204bef3f4.zip |
Fix a flaky test which fails roughly once in 9000 iterations
Ranodm(9000) means it can also be 0 so the test should allow reading 300 bytes only
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908242 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi/src')
-rw-r--r-- | poi/src/test/java/org/apache/poi/util/TestIOUtils.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/poi/src/test/java/org/apache/poi/util/TestIOUtils.java b/poi/src/test/java/org/apache/poi/util/TestIOUtils.java index cb335921cb..481afd28be 100644 --- a/poi/src/test/java/org/apache/poi/util/TestIOUtils.java +++ b/poi/src/test/java/org/apache/poi/util/TestIOUtils.java @@ -322,7 +322,8 @@ final class TestIOUtils { len = IOUtils.toByteArray(is, 90, 100).length; assertEquals(90, len); len = IOUtils.toByteArray(is, Integer.MAX_VALUE, Integer.MAX_VALUE).length; - assertTrue(len > 300-2*90); + assertTrue(len >= 300-2*90, + "Had: " + len + " when reading file " + TMP + " with size " + TMP.length()); } } |