nicoloboschi commented on code in PR #15851:
URL: https://github.com/apache/pulsar/pull/15851#discussion_r885444699
##########
pulsar-client/src/test/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImplTest.java:
##########
@@ -112,9 +112,13 @@ public void testGetStats() throws Exception {
MultiTopicsConsumerImpl impl = new MultiTopicsConsumerImpl(
clientImpl, consumerConfData,
- executorProvider, null, null, null, true);
+ executorProvider, null, Schema.BYTES, null, true);
impl.getStats();
+
+ clientImpl.close();
+ executorProvider.shutdownNow();
+ eventLoopGroup.shutdownGracefully().get();
Review Comment:
sync() ?
##########
pulsar-client/src/test/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImplTest.java:
##########
@@ -112,9 +112,13 @@ public void testGetStats() throws Exception {
MultiTopicsConsumerImpl impl = new MultiTopicsConsumerImpl(
clientImpl, consumerConfData,
- executorProvider, null, null, null, true);
+ executorProvider, null, Schema.BYTES, null, true);
impl.getStats();
+
+ clientImpl.close();
+ executorProvider.shutdownNow();
Review Comment:
it is better to wait for threads termination here, you can use the
GracefulShutdown utility
##########
pulsar-client/src/test/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImplTest.java:
##########
@@ -112,9 +112,13 @@ public void testGetStats() throws Exception {
MultiTopicsConsumerImpl impl = new MultiTopicsConsumerImpl(
clientImpl, consumerConfData,
- executorProvider, null, null, null, true);
+ executorProvider, null, Schema.BYTES, null, true);
impl.getStats();
+
+ clientImpl.close();
+ executorProvider.shutdownNow();
+ eventLoopGroup.shutdownGracefully().get();
Review Comment:
and then we can remove the
@Cleanup annotations ?
--
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]