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 271f3155f58fcd9f3b8a83930aacce57ad806520 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu May 5 14:14:08 2022 -0400 Fix broken tests. --- .../commons/compress/archivers/ArchiveServiceLoaderTest.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/apache/commons/compress/archivers/ArchiveServiceLoaderTest.java b/src/test/java/org/apache/commons/compress/archivers/ArchiveServiceLoaderTest.java index 9d101050..9cbe865c 100644 --- a/src/test/java/org/apache/commons/compress/archivers/ArchiveServiceLoaderTest.java +++ b/src/test/java/org/apache/commons/compress/archivers/ArchiveServiceLoaderTest.java @@ -19,22 +19,24 @@ package org.apache.commons.compress.archivers; +import static org.junit.Assert.assertThrows; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; -import org.apache.commons.compress.archivers.TestArchiveStreamProvider.ArchiveInvocationConfirmationException; import org.junit.jupiter.api.Test; public class ArchiveServiceLoaderTest { @Test - public void testInputStream() throws ArchiveException { - ArchiveStreamFactory.DEFAULT.createArchiveInputStream("ArchiveTestInput1", new ByteArrayInputStream(new byte[] {})); + public void testInputStream() { + assertThrows(ArchiveException.class, + () -> ArchiveStreamFactory.DEFAULT.createArchiveInputStream("ArchiveTestInput1", new ByteArrayInputStream(new byte[] {}))); } @Test public void testOutputStream() throws ArchiveException { - ArchiveStreamFactory.DEFAULT.createArchiveOutputStream("ArchiveTestOutput1", new ByteArrayOutputStream()); + assertThrows(ArchiveException.class, () -> ArchiveStreamFactory.DEFAULT.createArchiveOutputStream("ArchiveTestOutput1", new ByteArrayOutputStream())); } }