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

Removing JNLPLauncher.webSocket notation in nodes.md #566

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
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 @@ -33,7 +33,6 @@
import hudson.remoting.Launcher;
import hudson.remoting.VirtualChannel;
import hudson.security.Permission;
import hudson.slaves.JNLPLauncher;
import hudson.util.IOUtils;
import java.io.File;
import java.io.FileInputStream;
Expand Down Expand Up @@ -782,9 +781,6 @@ protected void printTo(PrintWriter out, ContentFilter filter) throws IOException
if (node instanceof Slave) {
Slave agent = (Slave) node;
out.println(" - Launch method: " + getDescriptorName(agent.getLauncher()));
if (agent.getLauncher() instanceof JNLPLauncher) {
out.println(" - WebSocket: " + ((JNLPLauncher) agent.getLauncher()).isWebSocket());
}
out.println(" - Availability: " + getDescriptorName(agent.getRetentionStrategy()));
}
Optional.ofNullable(node.toComputer())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,16 @@ public void testAboutJenkinsContent() {
}

@Test
@Issue("JENKINS-65097")
public void testAboutNodesContent() throws Exception {

DumbSlave tcp1 = j.createSlave("tcp1", "test", null);
tcp1.setLauncher(new JNLPLauncher(false));
((JNLPLauncher) tcp1.getLauncher()).setWebSocket(false);
tcp1.setLauncher(new JNLPLauncher());
tcp1.save();

String aboutMdToString = SupportTestUtils.invokeComponentToString(
Objects.requireNonNull(ExtensionList.lookup(Component.class).get(AboutJenkins.class)));
assertThat(aboutMdToString, containsString(" * `" + tcp1.getNodeName() + "` (`hudson.slaves.DumbSlave`)"));
assertThat(aboutMdToString, containsString(" - Launch method: `hudson.slaves.JNLPLauncher`"));
assertThat(aboutMdToString, containsString(" - WebSocket: false"));

((JNLPLauncher) tcp1.getLauncher()).setWebSocket(true);
tcp1.save();

aboutMdToString = SupportTestUtils.invokeComponentToString(
Objects.requireNonNull(ExtensionList.lookup(Component.class).get(AboutJenkins.class)));
assertThat(aboutMdToString, containsString(" * `" + tcp1.getNodeName() + "` (`hudson.slaves.DumbSlave`)"));
assertThat(aboutMdToString, containsString(" - Launch method: `hudson.slaves.JNLPLauncher`"));
assertThat(aboutMdToString, containsString(" - WebSocket: true"));
}

@Test
Expand Down