From e04317352ec270a983550a13eb67a143b432f1d6 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Thu, 8 Aug 2024 19:26:01 -0400 Subject: [PATCH] Removing `JNLPLauncher.webSocket` notation in `nodes.md` --- .../jenkins/support/impl/AboutJenkins.java | 4 ---- .../jenkins/support/impl/AboutJenkinsTest.java | 14 +------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java b/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java index f0848a420..6c5ddee96 100644 --- a/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java +++ b/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java @@ -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; @@ -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()) diff --git a/src/test/java/com/cloudbees/jenkins/support/impl/AboutJenkinsTest.java b/src/test/java/com/cloudbees/jenkins/support/impl/AboutJenkinsTest.java index 073c6037d..763bdf8a5 100644 --- a/src/test/java/com/cloudbees/jenkins/support/impl/AboutJenkinsTest.java +++ b/src/test/java/com/cloudbees/jenkins/support/impl/AboutJenkinsTest.java @@ -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