diff --git a/test/src/test/java/jenkins/slaves/restarter/JnlpSlaveRestarterInstallerTest.java b/test/src/test/java/jenkins/slaves/restarter/JnlpSlaveRestarterInstallerTest.java index 421f00fd5dde..a13c94a5d241 100644 --- a/test/src/test/java/jenkins/slaves/restarter/JnlpSlaveRestarterInstallerTest.java +++ b/test/src/test/java/jenkins/slaves/restarter/JnlpSlaveRestarterInstallerTest.java @@ -25,7 +25,9 @@ package jenkins.slaves.restarter; import static org.junit.Assert.assertEquals; +import static org.junit.Assume.assumeFalse; +import hudson.Functions; import hudson.model.Slave; import hudson.slaves.DumbSlave; import java.util.concurrent.atomic.AtomicBoolean; @@ -49,15 +51,31 @@ public class JnlpSlaveRestarterInstallerTest { @Rule public LoggerRule logging = new LoggerRule().record(JnlpSlaveRestarterInstaller.class, Level.FINE).capture(10); + private static final String JENKINS_URL = System.getenv("JENKINS_URL") != null + ? System.getenv("JENKINS_URL") + : "http://localhost:8080/"; + @Issue("JENKINS-19055") @Test public void tcpReconnection() throws Throwable { + // TODO Enable when test is reliable on Windows + // When builds switched from ACI containers to virtual machines, this test consistently failed + // When the test is run on local Windows computers, it passes + // Disable the test on ci.jenkins.io and friends when running Windows + // Do not disable for Windows developers generally + assumeFalse(Functions.isWindows() && JENKINS_URL.contains("ci.jenkins.io")); reconnection(false); } @Issue("JENKINS-66446") @Test public void webSocketReconnection() throws Throwable { + // TODO Enable when test is reliable on Windows + // When builds switched from ACI containers to virtual machines, this test consistently failed + // When the test is run on local Windows computers, it passes + // Disable the test on ci.jenkins.io and friends when running Windows + // Do not disable for Windows developers generally + assumeFalse(Functions.isWindows() && JENKINS_URL.contains("ci.jenkins.io")); reconnection(true); }