This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-compress.git
commit 662bebbc0a2deb3602bc857253b4180bc31ea645 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu May 5 15:48:46 2022 -0400 Fix broken tests. --- .../commons/compress/utils/ChecksumVerifyingInputStreamTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/apache/commons/compress/utils/ChecksumVerifyingInputStreamTest.java b/src/test/java/org/apache/commons/compress/utils/ChecksumVerifyingInputStreamTest.java index e817624c..96c60013 100644 --- a/src/test/java/org/apache/commons/compress/utils/ChecksumVerifyingInputStreamTest.java +++ b/src/test/java/org/apache/commons/compress/utils/ChecksumVerifyingInputStreamTest.java @@ -25,6 +25,7 @@ import java.util.zip.CRC32; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThrows; /** * Unit tests for class {@link ChecksumVerifyingInputStream org.apache.commons.compress.utils.ChecksumVerifyingInputStream}. @@ -40,7 +41,7 @@ public class ChecksumVerifyingInputStreamTest { final byte[] byteArray = new byte[3]; final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray); final ChecksumVerifyingInputStream checksumVerifyingInputStream = new ChecksumVerifyingInputStream(adler32, byteArrayInputStream, (-1859L), (byte) (-68)); - checksumVerifyingInputStream.read(byteArray); + assertThrows(IOException.class, () -> checksumVerifyingInputStream.read(byteArray)); } @Test @@ -49,7 +50,7 @@ public class ChecksumVerifyingInputStreamTest { final byte[] byteArray = new byte[9]; final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray); final ChecksumVerifyingInputStream checksumVerifyingInputStream = new ChecksumVerifyingInputStream(cRC32_, byteArrayInputStream, (byte)1, (byte)1); - checksumVerifyingInputStream.read(); + assertThrows(IOException.class, () -> checksumVerifyingInputStream.read()); } @Test