You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ji...@apache.org on 2022/09/05 11:33:28 UTC
[pulsar] branch branch-2.10 updated: Revert "[Fix][Flaky-test] Fix testConsumeTxnMessage (#16981)"
This is an automated email from the ASF dual-hosted git repository.
jianghaiting pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.10 by this push:
new 7b7bbe2bd96 Revert "[Fix][Flaky-test] Fix testConsumeTxnMessage (#16981)"
7b7bbe2bd96 is described below
commit 7b7bbe2bd966d5a8eb9603827720fa7967a961d8
Author: JiangHaiting <ji...@apache.org>
AuthorDate: Mon Sep 5 19:28:30 2022 +0800
Revert "[Fix][Flaky-test] Fix testConsumeTxnMessage (#16981)"
This reverts commit 6db6679b419fc0951f42f43331e13cabe90c6130.
---
.../apache/pulsar/testclient/PerformanceTransactionTest.java | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/pulsar-testclient/src/test/java/org/apache/pulsar/testclient/PerformanceTransactionTest.java b/pulsar-testclient/src/test/java/org/apache/pulsar/testclient/PerformanceTransactionTest.java
index 1fcb925a5e2..936f70bedf3 100644
--- a/pulsar-testclient/src/test/java/org/apache/pulsar/testclient/PerformanceTransactionTest.java
+++ b/pulsar-testclient/src/test/java/org/apache/pulsar/testclient/PerformanceTransactionTest.java
@@ -36,7 +36,6 @@ import org.apache.pulsar.common.naming.NamespaceName;
import org.apache.pulsar.common.naming.TopicName;
import org.apache.pulsar.common.policies.data.ClusterData;
import org.apache.pulsar.common.policies.data.TenantInfoImpl;
-import org.awaitility.Awaitility;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
@@ -195,7 +194,7 @@ public class PerformanceTransactionTest extends MockedPulsarServiceBaseTest {
}
@Test
- public void testConsumeTxnMessage() throws Exception {
+ public void testConsumeTxnMessage() throws InterruptedException, PulsarClientException {
String argString = "%s -r 10 -u %s -txn -ss %s -st %s -sp %s -ntxn %d";
String subName = "sub";
String topic = testTopic + UUID.randomUUID();
@@ -223,18 +222,11 @@ public class PerformanceTransactionTest extends MockedPulsarServiceBaseTest {
});
thread.start();
thread.join();
-
- Awaitility.await().untilAsserted(() -> {
- admin.transactions().getCoordinatorStats().forEach((integer, transactionCoordinatorStats) -> {
- Assert.assertEquals(transactionCoordinatorStats.ongoingTxnSize, 0);
- });
- });
-
Consumer<byte[]> consumer = pulsarClient.newConsumer().subscriptionName(subName).topic(topic)
.subscriptionInitialPosition(SubscriptionInitialPosition.Earliest)
.subscriptionType(SubscriptionType.Exclusive)
.enableBatchIndexAcknowledgment(false)
- .subscribe();
+ .subscribe();
for (int i = 0; i < 5; i++) {
Message<byte[]> message = consumer.receive(2, TimeUnit.SECONDS);
Assert.assertNotNull(message);