mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 09:34:38 +02:00
8262900: ToolBasicTest fails to access HTTP server it starts
Reviewed-by: sundar, vromero
This commit is contained in:
parent
c70589c68c
commit
e43aee58e1
1 changed files with 1 additions and 1 deletions
|
@ -526,7 +526,7 @@ public class ToolBasicTest extends ReplToolTesting {
|
||||||
public void testOpenFileOverHttp() throws IOException {
|
public void testOpenFileOverHttp() throws IOException {
|
||||||
var script = "int a = 10;int b = 20;int c = a + b;";
|
var script = "int a = 10;int b = 20;int c = a + b;";
|
||||||
|
|
||||||
var localhostAddress = new InetSocketAddress(InetAddress.getLocalHost().getHostAddress(), 0);
|
var localhostAddress = new InetSocketAddress(InetAddress.getLoopbackAddress().getHostAddress(), 0);
|
||||||
var httpServer = HttpServer.create(localhostAddress, 0);
|
var httpServer = HttpServer.create(localhostAddress, 0);
|
||||||
try {
|
try {
|
||||||
httpServer.createContext("/script", exchange -> {
|
httpServer.createContext("/script", exchange -> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue