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

jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/main by this push:
     new b09508b072 Disable flaky SSH tests on Windows (#2550)
b09508b072 is described below

commit b09508b0729801cafcbbffa8900212c8f0c55026
Author: Holger Friedrich <[email protected]>
AuthorDate: Mon Apr 27 08:20:13 2026 +0200

    Disable flaky SSH tests on Windows (#2550)
    
    * Disable flaky SSH tests on Windows
    
    * more tests disabled
---
 .../apache/karaf/itests/ssh/BundleSshCommandSecurityTest.java  |  6 ++++++
 .../apache/karaf/itests/ssh/ConfigSshCommandSecurityTest.java  | 10 ++++++++++
 .../apache/karaf/itests/ssh/FeatureSshCommandSecurityTest.java |  6 ++++++
 .../apache/karaf/itests/ssh/JaasSshCommandSecurityTest.java    |  5 +++++
 .../org/apache/karaf/itests/ssh/SystemCommandSecurityTest.java |  6 ++++++
 5 files changed, 33 insertions(+)

diff --git 
a/itests/test/src/test/java/org/apache/karaf/itests/ssh/BundleSshCommandSecurityTest.java
 
b/itests/test/src/test/java/org/apache/karaf/itests/ssh/BundleSshCommandSecurityTest.java
index be2474aeae..3ac60a0f68 100644
--- 
a/itests/test/src/test/java/org/apache/karaf/itests/ssh/BundleSshCommandSecurityTest.java
+++ 
b/itests/test/src/test/java/org/apache/karaf/itests/ssh/BundleSshCommandSecurityTest.java
@@ -13,6 +13,7 @@
  */
 package org.apache.karaf.itests.ssh;
 
+import org.junit.Assume;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.junit.PaxExam;
@@ -32,6 +33,11 @@ public class BundleSshCommandSecurityTest extends 
SshCommandTestBase {
 
     @Test
     public void testBundleCommandSecurityViaSsh() throws Exception {
+        // Skip on Windows where PTY output can be garbled,
+        // when upgrading to Junit5, this can be replaced with 
@DisabledOnOs(OS.WINDOWS)
+        // TODO: remove this once we have a better solution for PTY output on 
Windows
+        Assume.assumeFalse(System.getProperty("os.name", 
"").toLowerCase().contains("win"));
+
         String manageruser = "man" + System.nanoTime() + "_" + counter++;
         String vieweruser = "view" + System.nanoTime() + "_" + counter++;
 
diff --git 
a/itests/test/src/test/java/org/apache/karaf/itests/ssh/ConfigSshCommandSecurityTest.java
 
b/itests/test/src/test/java/org/apache/karaf/itests/ssh/ConfigSshCommandSecurityTest.java
index 9388828fef..97695cc094 100644
--- 
a/itests/test/src/test/java/org/apache/karaf/itests/ssh/ConfigSshCommandSecurityTest.java
+++ 
b/itests/test/src/test/java/org/apache/karaf/itests/ssh/ConfigSshCommandSecurityTest.java
@@ -13,6 +13,7 @@
  */
 package org.apache.karaf.itests.ssh;
 
+import org.junit.Assume;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.junit.PaxExam;
@@ -33,6 +34,10 @@ public class ConfigSshCommandSecurityTest extends 
SshCommandTestBase {
 
     @Test
     public void testConfigCommandSecurityViaSsh() throws Exception {
+        // Skip on Windows where PTY output can be garbled,
+        // when upgrading to Junit5, this can be replaced with 
@DisabledOnOs(OS.WINDOWS)
+        // TODO: remove this once we have a better solution for PTY output on 
Windows
+        Assume.assumeFalse(System.getProperty("os.name", 
"").toLowerCase().contains("win"));
         String manageruser = "man" + System.nanoTime() + "_" + counter++;
         String vieweruser = "view" + System.nanoTime() + "_" + counter++;
 
@@ -90,6 +95,11 @@ public class ConfigSshCommandSecurityTest extends 
SshCommandTestBase {
 
     @Test
     public void testConfigCommandSecurityWithoutEditSessionViaSsh() throws 
Exception {
+        // Skip on Windows where PTY output can be garbled,
+        // when upgrading to Junit5, this can be replaced with 
@DisabledOnOs(OS.WINDOWS)
+        // TODO: remove this once we have a better solution for PTY output on 
Windows
+        Assume.assumeFalse(System.getProperty("os.name", 
"").toLowerCase().contains("win"));
+
         String manageruser = "man" + System.nanoTime() + "_" + counter++;
         String vieweruser = "view" + System.nanoTime() + "_" + counter++;
 
diff --git 
a/itests/test/src/test/java/org/apache/karaf/itests/ssh/FeatureSshCommandSecurityTest.java
 
b/itests/test/src/test/java/org/apache/karaf/itests/ssh/FeatureSshCommandSecurityTest.java
index 30463de3c4..0ec55c3d72 100644
--- 
a/itests/test/src/test/java/org/apache/karaf/itests/ssh/FeatureSshCommandSecurityTest.java
+++ 
b/itests/test/src/test/java/org/apache/karaf/itests/ssh/FeatureSshCommandSecurityTest.java
@@ -14,6 +14,7 @@
 package org.apache.karaf.itests.ssh;
 
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Test;
 
 /**
@@ -26,6 +27,11 @@ public class FeatureSshCommandSecurityTest extends 
SshCommandTestBase {
     
     @Test
     public void testFeatureCommandSecurityViaSsh() throws Exception {
+        // Skip on Windows where PTY output can be garbled,
+        // when upgrading to Junit5, this can be replaced with 
@DisabledOnOs(OS.WINDOWS)
+        // TODO: remove this once we have a better solution for PTY output on 
Windows
+        Assume.assumeFalse(System.getProperty("os.name", 
"").toLowerCase().contains("win"));
+
         String vieweruser = "viewer" + System.nanoTime() + "_features";
         String feature = "wrapper";
 
diff --git 
a/itests/test/src/test/java/org/apache/karaf/itests/ssh/JaasSshCommandSecurityTest.java
 
b/itests/test/src/test/java/org/apache/karaf/itests/ssh/JaasSshCommandSecurityTest.java
index 65f59e3097..c5a10e2579 100644
--- 
a/itests/test/src/test/java/org/apache/karaf/itests/ssh/JaasSshCommandSecurityTest.java
+++ 
b/itests/test/src/test/java/org/apache/karaf/itests/ssh/JaasSshCommandSecurityTest.java
@@ -16,6 +16,7 @@ package org.apache.karaf.itests.ssh;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
+import org.junit.Assume;
 import org.junit.Test;
 
 /**
@@ -27,6 +28,10 @@ public class JaasSshCommandSecurityTest extends 
SshCommandTestBase {
         
     @Test
     public void testJaasCommandSecurityViaSsh() throws Exception {
+        // Skip on Windows where PTY output can be garbled,
+        // when upgrading to Junit5, this can be replaced with 
@DisabledOnOs(OS.WINDOWS)
+        // TODO: remove this once we have a better solution for PTY output on 
Windows
+
         String vieweruser = "viewer" + System.nanoTime() + "_jaas";
 
         addViewer(vieweruser);
diff --git 
a/itests/test/src/test/java/org/apache/karaf/itests/ssh/SystemCommandSecurityTest.java
 
b/itests/test/src/test/java/org/apache/karaf/itests/ssh/SystemCommandSecurityTest.java
index 4a6d554581..18f5f405b1 100644
--- 
a/itests/test/src/test/java/org/apache/karaf/itests/ssh/SystemCommandSecurityTest.java
+++ 
b/itests/test/src/test/java/org/apache/karaf/itests/ssh/SystemCommandSecurityTest.java
@@ -14,6 +14,7 @@
 package org.apache.karaf.itests.ssh;
 
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.junit.PaxExam;
@@ -31,6 +32,11 @@ public class SystemCommandSecurityTest extends 
SshCommandTestBase {
           
     @Test
     public void testSystemCommandSecurityViaSsh() throws Exception {
+        // Skip on Windows where PTY output can be garbled,
+        // when upgrading to Junit5, this can be replaced with 
@DisabledOnOs(OS.WINDOWS)
+        // TODO: remove this once we have a better solution for PTY output on 
Windows
+        Assume.assumeFalse(System.getProperty("os.name", 
"").toLowerCase().contains("win"));
+
         String manageruser = "man" + System.nanoTime() + "_" + counter++;
         String vieweruser = "view" + System.nanoTime() + "_" + counter++;
 

Reply via email to