eolivelli commented on a change in pull request #11304:
URL: https://github.com/apache/pulsar/pull/11304#discussion_r684314399
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/broker/transaction/buffer/TransactionBufferClientTest.java
##########
@@ -311,10 +232,32 @@ public void testTransactionBufferChannelUnActive() {
}
@Test
- public void testTransactionBufferLookUp() throws ExecutionException,
InterruptedException {
+ public void testTransactionBufferLookUp() throws Exception {
String topic = "persistent://" + namespace +
"/testTransactionBufferLookUp";
- tbClient.abortTxnOnSubscription(topic + "_abort_sub", "test", 1L, 1L,
-1L).get();
- tbClient.commitTxnOnSubscription(topic + "_commit_sub", "test", 1L,
1L, -1L).get();
+ String subName = "test";
+ admin.topics().createNonPartitionedTopic(topic + "_abort_sub");
+ admin.topics().createSubscription(topic + "_abort_sub", subName,
MessageId.earliest);
+
+ admin.topics().createNonPartitionedTopic(topic + "_commit_sub");
+ admin.topics().createSubscription(topic + "_commit_sub", subName,
MessageId.earliest);
+
+ Awaitility.await().until(() -> {
Review comment:
There is some utility method to wait for the coordinator to be started.
Can we use it?
It is not clear why we need this wait loop.
It may hide many other internal errors.
This is a test case and we should have full control over what's going on
--
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]