You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/05/05 20:08:15 UTC

[commons-compress] branch master updated (503ddc44 -> 06ad5fa7)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git


    from 503ddc44 Fix broken tests.
     new ec83a42d No console output.
     new 06ad5fa7 Fix broken tests.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/commons/compress/archivers/jar/ExpandApkTest.java | 2 +-
 .../compress/compressors/CompressorServiceLoaderTest.java        | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)


[commons-compress] 01/02: No console output.

Posted by gg...@apache.org.
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 ec83a42db1afa58a029c0fd6d8cecc1951716bd2
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 5 16:06:07 2022 -0400

    No console output.
---
 .../java/org/apache/commons/compress/archivers/jar/ExpandApkTest.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/compress/archivers/jar/ExpandApkTest.java b/src/test/java/org/apache/commons/compress/archivers/jar/ExpandApkTest.java
index ea2ba443..1353041e 100644
--- a/src/test/java/org/apache/commons/compress/archivers/jar/ExpandApkTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/jar/ExpandApkTest.java
@@ -40,7 +40,7 @@ public class ExpandApkTest {
     }
 
     private <T> T println(T object) {
-        System.out.println(object);
+        // System.out.println(object);
         return object;
     }
 }


[commons-compress] 02/02: Fix broken tests.

Posted by gg...@apache.org.
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 06ad5fa79637e1ccc3850d1f51fc1d0e29b80069
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 5 16:08:10 2022 -0400

    Fix broken tests.
---
 .../compress/compressors/CompressorServiceLoaderTest.java        | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/compress/compressors/CompressorServiceLoaderTest.java b/src/test/java/org/apache/commons/compress/compressors/CompressorServiceLoaderTest.java
index 006df819..72d4f207 100644
--- a/src/test/java/org/apache/commons/compress/compressors/CompressorServiceLoaderTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/CompressorServiceLoaderTest.java
@@ -19,22 +19,27 @@
 
 package org.apache.commons.compress.compressors;
 
+import static org.junit.Assert.assertThrows;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 
 import org.apache.commons.compress.compressors.TestCompressorStreamProvider.InvocationConfirmationException;
+import org.apache.commons.lang3.ArrayUtils;
 import org.junit.jupiter.api.Test;
 
 public class CompressorServiceLoaderTest {
 
     @Test
     public void testInputStream() throws CompressorException {
-        new CompressorStreamFactory().createCompressorInputStream("TestInput1", new ByteArrayInputStream(new byte[] {}));
+        assertThrows(InvocationConfirmationException.class,
+            () -> new CompressorStreamFactory().createCompressorInputStream("TestInput1", new ByteArrayInputStream(ArrayUtils.EMPTY_BYTE_ARRAY)));
     }
 
     @Test
     public void testOutputStream() throws CompressorException {
-        new CompressorStreamFactory().createCompressorOutputStream("TestOutput1", new ByteArrayOutputStream());
+        assertThrows(InvocationConfirmationException.class,
+            () -> new CompressorStreamFactory().createCompressorOutputStream("TestOutput1", new ByteArrayOutputStream()));
     }
 
 }