lhotari commented on a change in pull request #10206:
URL: https://github.com/apache/pulsar/pull/10206#discussion_r614037648
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/broker/transaction/buffer/TransactionBufferClientTest.java
##########
@@ -161,8 +175,40 @@ public void testAbortOnSubscription() throws
ExecutionException, InterruptedExce
futures.add(tbClient.abortTxnOnSubscription(topic, "test", 1L, i,
-1L));
}
for (int i = 0; i < futures.size(); i++) {
- Assert.assertEquals(futures.get(i).get().getMostSigBits(), 1L);
- Assert.assertEquals(futures.get(i).get().getLeastSigBits(), i);
+ assertEquals(futures.get(i).get().getMostSigBits(), 1L);
+ assertEquals(futures.get(i).get().getLeastSigBits(), i);
+ }
+ }
+
+ @Test
+ public void testTransactionBufferClientTimeout() throws Exception {
+ ConnectionPool connectionPool = mock(ConnectionPool.class);
+ NamespaceService namespaceService = mock(NamespaceService.class);
+ HashedWheelTimer hashedWheelTimer = new HashedWheelTimer();
Review comment:
Use Lombok's `@Cleanup("stop")` to make sure that the timer is closed
when the test completes. This test will "leak" threads if the timer isn't
stopped.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]