gentoo-ebuilds/dev-java/commons-io/files/commons-io-2.20.0-ThrottledInputStreamTest.patch
Volkmar W. Pogatzki fddb855d58
dev-java/commons-io: add 2.20.0
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Part-of: https://github.com/gentoo/gentoo/pull/42983
Signed-off-by: Sam James <sam@gentoo.org>
2025-10-03 06:08:42 +01:00

36 lines
2.1 KiB
Diff

testCloseHandleIOException()
tags: []
uniqueId: [engine:junit-jupiter]/[class:org.apache.commons.io.input.ThrottledInputStreamTest]/[method:testCloseHandleIOException()]
parent: [engine:junit-jupiter]/[class:org.apache.commons.io.input.ThrottledInputStreamTest]
source: MethodSource [className = 'org.apache.commons.io.input.ThrottledInputStreamTest', methodName = 'testCloseHandleIOException', methodParameterTypes = '']
caught: org.mockito.exceptions.base.MockitoException:
Cannot mock/spy class org.apache.commons.io.input.ThrottledInputStream
Mockito cannot mock/spy because :
- final class
at org.apache.commons.io.input.ProxyInputStreamTest.testCloseHandleIOException(ProxyInputStreamTest.java:86)
at org.apache.commons.io.input.ProxyInputStreamTest.testCloseHandleIOException(ProxyInputStreamTest.java:80)
at org.apache.commons.io.input.ThrottledInputStreamTest.testCloseHandleIOException(ThrottledInputStreamTest.java:175)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
duration: 2 ms
status: ✘ FAILED
--- a/src/test/java/org/apache/commons/io/input/ThrottledInputStreamTest.java
+++ b/src/test/java/org/apache/commons/io/input/ThrottledInputStreamTest.java
@@ -31,6 +31,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.input.ThrottledInputStream.Builder;
import org.apache.commons.io.test.CustomIOException;
+import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
@@ -170,6 +171,7 @@ class ThrottledInputStreamTest extends ProxyInputStreamTest<ThrottledInputStream
assertEquals(0, ThrottledInputStream.toSleepMillis(1, 1_000, 1.0));
}
+ @Disabled
@Test
void testCloseHandleIOException() throws IOException {
ProxyInputStreamTest.testCloseHandleIOException(ThrottledInputStream.builder());