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 abf6a7551a3b60a280d221ace486df9800b4eaf8 Author: Gary Gregory <[email protected]> AuthorDate: Thu May 5 14:16:38 2022 -0400 Fix broken tests. --- .../commons/compress/archivers/ArchiveStreamFactoryTest.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java b/src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java index 33deb04d..3ac43f94 100644 --- a/src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java +++ b/src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java @@ -21,6 +21,7 @@ package org.apache.commons.compress.archivers; import static org.apache.commons.compress.AbstractTestCase.getFile; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -90,16 +91,14 @@ public class ArchiveStreamFactoryTest { @Test public void cantRead7zFromStream() throws Exception { - ArchiveStreamFactory.DEFAULT - .createArchiveInputStream(ArchiveStreamFactory.SEVEN_Z, - new ByteArrayInputStream(ByteUtils.EMPTY_BYTE_ARRAY)); + assertThrows(StreamingNotSupportedException.class, + () -> ArchiveStreamFactory.DEFAULT.createArchiveInputStream(ArchiveStreamFactory.SEVEN_Z, new ByteArrayInputStream(ByteUtils.EMPTY_BYTE_ARRAY))); } @Test public void cantWrite7zToStream() throws Exception { - ArchiveStreamFactory.DEFAULT - .createArchiveOutputStream(ArchiveStreamFactory.SEVEN_Z, - new ByteArrayOutputStream()); + assertThrows(StreamingNotSupportedException.class, + () -> ArchiveStreamFactory.DEFAULT.createArchiveOutputStream(ArchiveStreamFactory.SEVEN_Z, new ByteArrayOutputStream())); } /**
