diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/AbstractTestIPC.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/AbstractTestIPC.java index 248e8f9d8cef..0a13debf9783 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/AbstractTestIPC.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/AbstractTestIPC.java @@ -581,6 +581,8 @@ public void testTracingSuccessIpc() throws IOException, ServiceException { everyItem(allOf(hasStatusWithCode(StatusCode.OK), hasTraceId(traceRule.getSpans().iterator().next().getTraceId()), hasDuration(greaterThanOrEqualTo(Duration.ofMillis(100L)))))); + } finally { + rpcServer.stop(); } } @@ -609,6 +611,8 @@ public void testTracingErrorIpc() throws IOException { assertFalse("no spans provided", traceRule.getSpans().isEmpty()); assertThat(traceRule.getSpans(), everyItem(allOf(hasStatusWithCode(StatusCode.ERROR), hasTraceId(traceRule.getSpans().iterator().next().getTraceId())))); + } finally { + rpcServer.stop(); } } @@ -670,6 +674,8 @@ public void testGetConnectionRegistry() throws IOException, ServiceException { GetConnectionRegistryResponse resp = stub.getConnectionRegistry(null, GetConnectionRegistryRequest.getDefaultInstance()); assertEquals(clusterId, resp.getClusterId()); + } finally { + rpcServer.stop(); } } @@ -701,6 +707,8 @@ public void testGetConnectionRegistryError() throws IOException, ServiceExceptio assertEquals(FatalConnectionException.class.getName(), ((RemoteException) pcrc.getFailed()).getClassName()); assertThat(pcrc.getFailed().getMessage(), startsWith("Expected HEADER=")); + } finally { + rpcServer.stop(); } } }