summaryrefslogtreecommitdiffstats
path: root/configserver/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'configserver/src/test')
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/rpc/RpcTester.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/RpcTester.java b/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/RpcTester.java
index 336dd6bf84c..c0ef7df9404 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/RpcTester.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/RpcTester.java
@@ -91,7 +91,6 @@ public class RpcTester implements AutoCloseable {
tempTenantRepository.addTenant(tenantName);
startRpcServer(tempRpcServer, tempTenantRepository, tempSpec);
iterations++;
- Thread.sleep(1);
} while (!tempRpcServer.isRunning() && iterations < 10);
spec = tempSpec;
@@ -106,11 +105,12 @@ public class RpcTester implements AutoCloseable {
.build();
}
- public void close() {
+ public void close() throws InterruptedException {
rpcServer.stop();
for (Integer port : allocatedPorts) {
PortRangeAllocator.releasePort(port);
}
+ t.join();
}
private int allocatePort() throws InterruptedException {
@@ -147,12 +147,6 @@ public class RpcTester implements AutoCloseable {
pingServer(spec);
}
- @After
- public void stopRpc() throws InterruptedException {
- rpcServer.stop();
- t.join();
- }
-
private Spec createSpec(int port) {
return new Spec("tcp/localhost:" + port);
}