From 5be7d77da12836f018c16b6394f024010fb5d56b Mon Sep 17 00:00:00 2001 From: imonteroperez Date: Tue, 23 Jan 2024 12:09:17 +0100 Subject: [PATCH] Adapt to run test on IPv6 --- .../plugins/workflow/DirectArtifactManagerFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/jenkinsci/plugins/workflow/DirectArtifactManagerFactory.java b/src/test/java/org/jenkinsci/plugins/workflow/DirectArtifactManagerFactory.java index 00fedd9b..f02bac99 100644 --- a/src/test/java/org/jenkinsci/plugins/workflow/DirectArtifactManagerFactory.java +++ b/src/test/java/org/jenkinsci/plugins/workflow/DirectArtifactManagerFactory.java @@ -102,7 +102,7 @@ public DirectArtifactManagerFactory() throws Exception { }). create(); server.start(); - baseURL = new URL("http://" + server.getInetAddress().getHostName() + ":" + server.getLocalPort() + "/"); + baseURL = new URL("http", server.getInetAddress().getHostName(), server.getLocalPort(), "/"); LOGGER.log(Level.INFO, "Mock server running at {0}", baseURL); }