This is an automated email from the ASF dual-hosted git repository.
stoty pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new 4ac5b6dfa82 HBASE-29700 Always close RPC servers in AbstractTestIPC
(#7435)
4ac5b6dfa82 is described below
commit 4ac5b6dfa82ff8c9b62180d3936109b229d815f8
Author: Istvan Toth <[email protected]>
AuthorDate: Tue Nov 4 18:37:22 2025 +0100
HBASE-29700 Always close RPC servers in AbstractTestIPC (#7435)
(cherry picked from commit 5fb9066d646e6b259936b88c4de58e45432436d1)
Signed-off-by: Duo Zhang <[email protected]>
---
.../test/java/org/apache/hadoop/hbase/ipc/AbstractTestIPC.java | 8 ++++++++
1 file changed, 8 insertions(+)
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 e9d0e8de30b..b18d111c336 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 abstract class AbstractTestIPC {
everyItem(allOf(hasStatusWithCode(StatusCode.OK),
hasTraceId(traceRule.getSpans().iterator().next().getTraceId()),
hasDuration(greaterThanOrEqualTo(Duration.ofMillis(100L))))));
+ } finally {
+ rpcServer.stop();
}
}
@@ -609,6 +611,8 @@ public abstract class AbstractTestIPC {
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 abstract class AbstractTestIPC {
GetConnectionRegistryResponse resp =
stub.getConnectionRegistry(null,
GetConnectionRegistryRequest.getDefaultInstance());
assertEquals(clusterId, resp.getClusterId());
+ } finally {
+ rpcServer.stop();
}
}
@@ -701,6 +707,8 @@ public abstract class AbstractTestIPC {
assertEquals(FatalConnectionException.class.getName(),
((RemoteException) pcrc.getFailed()).getClassName());
assertThat(pcrc.getFailed().getMessage(), startsWith("Expected
HEADER="));
+ } finally {
+ rpcServer.stop();
}
}
}