tisonkun commented on code in PR #18635:
URL: https://github.com/apache/pulsar/pull/18635#discussion_r1032490506
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/v3/AdminApiTransactionTest.java:
##########
@@ -624,8 +624,9 @@ public void testUpdateTransactionCoordinatorNumber() throws
Exception {
}
admin.transactions().scaleTransactionCoordinators(coordinatorSize * 2);
- pulsarClient =
PulsarClient.builder().serviceUrl(lookupUrl.toString()).enableTransaction(true).build();
+
replacePulsarClient(PulsarClient.builder().serviceUrl(lookupUrl.toString()).enableTransaction(true));
pulsarClient.close();
Review Comment:
This kind of code read strange to me. What's the original purpose of such a
code snippet? We obtain a new client but never use it, must we replace the
global `pulsarClient` instead of init a local one?
Also, `replacePulsarClient` calls `shutdown` while we call `close` in those
test code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]