Skip to content

Commit ef9700b

Browse files
author
adriancole
committed
workaround test failures due to invalid hostnames on jenkins slaves
1 parent 4f8890a commit ef9700b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

feign-ribbon/src/test/java/feign/ribbon/LoadBalancingTargetTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public void loadBalancingDefaultPolicyRoundRobin() throws IOException, Interrupt
6969
}
7070

7171
static String hostAndPort(URL url) {
72-
return url.getHost() + ":" + url.getPort();
72+
// our build slaves have underscores in their hostnames which aren't permitted by ribbon
73+
return "localhost:" + url.getPort();
7374
}
7475
}

feign-ribbon/src/test/java/feign/ribbon/RibbonClientTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public void loadBalancingDefaultPolicyRoundRobin() throws IOException, Interrupt
6969
}
7070

7171
static String hostAndPort(URL url) {
72-
return url.getHost() + ":" + url.getPort();
72+
// our build slaves have underscores in their hostnames which aren't permitted by ribbon
73+
return "localhost:" + url.getPort();
7374
}
7475
}

0 commit comments

Comments
 (0)