aboutsummaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2023-08-22 10:40:25 +0200
committerHarald Musum <musum@yahooinc.com>2023-08-22 10:40:25 +0200
commit833129baae1d632d0d81b237fa23b4b76970d5a2 (patch)
tree7b18c4c852b8a932e28ba66a830561c0031443f4 /configserver
parent40f3df18a46fd3ed7c795064c2e26d3ca3839526 (diff)
Remove unused method, wait for server thread to finish
Diffstat (limited to 'configserver')
-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);
}