commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject commons-compress git commit: COMPRESS-416 disable powermock test on Java9
Date Tue, 04 Jul 2017 09:07:41 GMT
Repository: commons-compress
Updated Branches:
  refs/heads/master 9052f4df8 -> 283f1bceb


COMPRESS-416 disable powermock test on Java9


Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/283f1bce
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/283f1bce
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/283f1bce

Branch: refs/heads/master
Commit: 283f1bceb87883ba6c965750e9880ce3d67af089
Parents: 9052f4d
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Tue Jul 4 11:07:16 2017 +0200
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Tue Jul 4 11:07:16 2017 +0200

----------------------------------------------------------------------
 .../compressors/z/ZCompressorInputStreamTest.java         | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/283f1bce/src/test/java/org/apache/commons/compress/compressors/z/ZCompressorInputStreamTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/compressors/z/ZCompressorInputStreamTest.java
b/src/test/java/org/apache/commons/compress/compressors/z/ZCompressorInputStreamTest.java
index 7b9ed54..8f62c9b 100644
--- a/src/test/java/org/apache/commons/compress/compressors/z/ZCompressorInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/compressors/z/ZCompressorInputStreamTest.java
@@ -39,6 +39,14 @@ public class ZCompressorInputStreamTest {
 
     @Test(expected = IOException.class)
     public void testFailsToCreateZCompressorInputStreamAndThrowsIOException() throws IOException
{
+        boolean java9 = false;
+        try {
+            Class.forName("java.lang.module.ModuleDescriptor");
+            java9 = true;
+        } catch (Exception ex) {
+            // not Java9
+        }
+        org.junit.Assume.assumeFalse("can't use PowerMock with Java9", java9);
 
         Enumeration<SequenceInputStream> enumeration = (Enumeration<SequenceInputStream>)
mock(Enumeration.class);
         SequenceInputStream sequenceInputStream = new SequenceInputStream(enumeration);
@@ -51,4 +59,4 @@ public class ZCompressorInputStreamTest {
     }
 
 
-}
\ No newline at end of file
+}


Mime
View raw message