Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backporting for 2.492.1 LTS #10196

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading