diff --git a/javatests/google/registry/server/RegistryTestServer.java b/javatests/google/registry/server/RegistryTestServer.java index ceb641b7e..911eb7a52 100644 --- a/javatests/google/registry/server/RegistryTestServer.java +++ b/javatests/google/registry/server/RegistryTestServer.java @@ -99,7 +99,7 @@ public final class RegistryTestServer { private final TestServer server; - /** @see TestServer#TestServer(HostAndPort, java.util.Map, Iterable, Iterable) */ + /** @see TestServer#TestServer(HostAndPort, ImmutableMap, ImmutableList, ImmutableList) */ public RegistryTestServer(HostAndPort address) { server = new TestServer(address, RUNFILES, ROUTES, FILTERS); } diff --git a/javatests/google/registry/server/TestServer.java b/javatests/google/registry/server/TestServer.java index 9cf4502ed..893ed3c25 100644 --- a/javatests/google/registry/server/TestServer.java +++ b/javatests/google/registry/server/TestServer.java @@ -20,6 +20,7 @@ import static com.google.common.util.concurrent.Runnables.doNothing; import static google.registry.util.NetworkUtils.getCanonicalHostName; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; import com.google.common.net.HostAndPort; import com.google.common.util.concurrent.SimpleTimeLimiter; import java.net.MalformedURLException; @@ -84,7 +85,7 @@ public final class TestServer { */ public TestServer( HostAndPort address, - Map runfiles, + ImmutableMap runfiles, ImmutableList routes, ImmutableList> filters) { urlAddress = createUrlAddress(address); @@ -179,20 +180,20 @@ public final class TestServer { private static Connector createConnector(HostAndPort address) { SocketConnector connector = new SocketConnector(); - connector.setHost(address.getHostText()); + connector.setHost(address.getHost()); connector.setPort(address.getPortOrDefault(DEFAULT_PORT)); return connector; } /** Converts a bind address into an address that other machines can use to connect here. */ private static HostAndPort createUrlAddress(HostAndPort address) { - if (address.getHostText().equals("::") || address.getHostText().equals("0.0.0.0")) { + if (address.getHost().equals("::") || address.getHost().equals("0.0.0.0")) { return address.getPortOrDefault(DEFAULT_PORT) == DEFAULT_PORT ? HostAndPort.fromHost(getCanonicalHostName()) : HostAndPort.fromParts(getCanonicalHostName(), address.getPort()); } else { return address.getPortOrDefault(DEFAULT_PORT) == DEFAULT_PORT - ? HostAndPort.fromHost(address.getHostText()) + ? HostAndPort.fromHost(address.getHost()) : address; } }