mirror of https://github.com/apache/poi.git
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
This commit is contained in:
parent
85d436b601
commit
f192c95e0f
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue