Skip to content

Commit

Permalink
Merge pull request #180 from jglick/waitOnline
Browse files Browse the repository at this point in the history
Update `JenkinsRule#waitOnline()` to wait for all launchable agents, not just for `JNLPLauncher` implementations
  • Loading branch information
oleg-nenashev authored Nov 22, 2019
2 parents 028b72d + a467c6f commit b68bd22
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/org/jvnet/hudson/test/JenkinsRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@
import hudson.model.Job;
import hudson.model.Slave;
import hudson.model.queue.QueueTaskFuture;
import hudson.slaves.JNLPLauncher;

import java.net.HttpURLConnection;
import java.nio.channels.ClosedByInterruptException;
Expand All @@ -231,7 +230,6 @@
import java.util.logging.Handler;
import jenkins.model.ParameterizedJobMixIn;
import jenkins.security.MasterToSlaveCallable;
import org.hamcrest.core.IsInstanceOf;
import org.junit.rules.DisableOnDebug;
import org.junit.rules.Timeout;
import org.junit.runners.model.TestTimedOutException;
Expand Down Expand Up @@ -1052,7 +1050,7 @@ public DumbSlave createOnlineSlave(Label l, EnvVars env) throws Exception {
*/
public void waitOnline(Slave s) throws Exception {
Computer computer = s.toComputer();
if (s.getLauncher() instanceof JNLPLauncher) {
if (!s.getLauncher().isLaunchSupported()) {
while (!computer.isOnline()) {
Thread.sleep(100);
}
Expand Down

0 comments on commit b68bd22

Please sign in to comment.