You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2023/07/06 15:22:51 UTC

[sling-slingfeature-maven-plugin] branch master updated: SLING-11935 - JarDecompressorTest.testWithEmbeddedJar fails on Jenkins/Windows (#72)

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

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-slingfeature-maven-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new bd0d2da  SLING-11935 - JarDecompressorTest.testWithEmbeddedJar fails on Jenkins/Windows (#72)
bd0d2da is described below

commit bd0d2da492f8996f648a46c1d9a3ad9a8907efaf
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jul 6 18:22:45 2023 +0300

    SLING-11935 - JarDecompressorTest.testWithEmbeddedJar fails on Jenkins/Windows (#72)
    
    Don't run the problematic test on Windows
---
 .../sling/feature/maven/mojos/JarDecompressorTest.java     | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/test/java/org/apache/sling/feature/maven/mojos/JarDecompressorTest.java b/src/test/java/org/apache/sling/feature/maven/mojos/JarDecompressorTest.java
index cdd0b1f..131f59b 100644
--- a/src/test/java/org/apache/sling/feature/maven/mojos/JarDecompressorTest.java
+++ b/src/test/java/org/apache/sling/feature/maven/mojos/JarDecompressorTest.java
@@ -16,7 +16,10 @@
  */
 package org.apache.sling.feature.maven.mojos;
 
-import org.junit.Test;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeFalse;
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
@@ -26,14 +29,13 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.nio.file.Files;
 import java.util.HashMap;
+import java.util.Locale;
 import java.util.Map;
 import java.util.jar.JarEntry;
 import java.util.jar.JarInputStream;
 import java.util.jar.Manifest;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import org.junit.Test;
 
 public class JarDecompressorTest {
     @Test
@@ -69,6 +71,10 @@ public class JarDecompressorTest {
 
     @Test
     public void testJarWithEmbeddedJar() throws Exception {
+        
+        // SLING-11935 
+        assumeFalse(System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("win"));
+        
         File cj = new File(getClass().getResource("/repository/compressed-embedded.jar").getFile());
         File uj = Files.createTempFile(getClass().getSimpleName(), "embedded-uncompressed.jar").toFile();