Skip to content

Commit

Permalink
Disable JnlpSlaveRestarterInstallerTest on ci.jenkins Windows agents (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEWaite authored Jan 22, 2025
2 parents e13cbbd + 92297a6 commit d40bd64
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}

Expand Down

0 comments on commit d40bd64

Please sign in to comment.