This is an automated email from the ASF dual-hosted git repository.
kharekartik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 678b6f8dec close grpc connection after query in ClusterTest (#15394)
678b6f8dec is described below
commit 678b6f8dece9ed178258545717fd4c6481473f10
Author: Shounak kulkarni <[email protected]>
AuthorDate: Fri Mar 28 15:04:40 2025 +0530
close grpc connection after query in ClusterTest (#15394)
---
.../java/org/apache/pinot/integration/tests/ClusterTest.java | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git
a/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/ClusterTest.java
b/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/ClusterTest.java
index 43fc3181b4..8a8b7c6a5e 100644
---
a/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/ClusterTest.java
+++
b/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/ClusterTest.java
@@ -528,9 +528,15 @@ public abstract class ClusterTest extends ControllerTest {
public JsonNode queryGrpcEndpoint(String query, Map<String, String>
metadataMap)
throws IOException {
- GrpcConnection grpcConnection =
- ConnectionFactory.fromHostListGrpc(new Properties(),
List.of(getBrokerGrpcEndpoint()));
- return grpcConnection.getJsonResponse(query, metadataMap);
+ GrpcConnection grpcConnection = null;
+ try {
+ grpcConnection = ConnectionFactory.fromHostListGrpc(new Properties(),
List.of(getBrokerGrpcEndpoint()));
+ return grpcConnection.getJsonResponse(query, metadataMap);
+ } finally {
+ if (grpcConnection != null) {
+ grpcConnection.close();
+ }
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]