summaryrefslogtreecommitdiffstats
path: root/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/StateGatherTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/StateGatherTest.java')
-rw-r--r--clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/StateGatherTest.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/StateGatherTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/StateGatherTest.java
index cf3a47b1add..194b51aa440 100644
--- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/StateGatherTest.java
+++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/StateGatherTest.java
@@ -1,14 +1,15 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.clustercontroller.core;
+import com.yahoo.jrt.Spec;
import com.yahoo.log.LogLevel;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import java.net.InetAddress;
import java.util.concurrent.TimeoutException;
import java.util.logging.Logger;
+import static org.junit.Assert.assertEquals;
+
public class StateGatherTest extends FleetControllerTest {
public static Logger log = Logger.getLogger(StateGatherTest.class.getName());
@@ -34,7 +35,7 @@ public class StateGatherTest extends FleetControllerTest {
options.nodeStateRequestTimeoutLatestPercentage = 80;
setUpFleetController(true, options);
String connectionSpecs[] = new String[1];
- connectionSpecs[0] = "tcp/" + InetAddress.getLocalHost().getHostName() + ":" + slobrok.port();
+ connectionSpecs[0] = Spec.fromLocalHostName(slobrok.port()).toString();
DummyVdsNodeOptions dummyOptions = new DummyVdsNodeOptions();
DummyVdsNode dnode = new DummyVdsNode(timer, dummyOptions, connectionSpecs, this.options.clusterName, true, 0);
DummyVdsNode snode = new DummyVdsNode(timer, dummyOptions, connectionSpecs, this.options.clusterName, false, 0);