From 56c9b8114d24a5662ea904f554a45e18a8c579f8 Mon Sep 17 00:00:00 2001 From: Dirk Adler Date: Sun, 24 Oct 2021 18:21:31 +0200 Subject: [PATCH] Tweak Producer transaction test --- tests/RdKafka/ProducerTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/RdKafka/ProducerTest.php b/tests/RdKafka/ProducerTest.php index 01b77347..4e27a754 100644 --- a/tests/RdKafka/ProducerTest.php +++ b/tests/RdKafka/ProducerTest.php @@ -131,7 +131,7 @@ public function testTransaction(): void $producer = new Producer($producerConf); - $producer->initTransactions(KAFKA_TEST_TIMEOUT_MS * 5); + $producer->initTransactions(KAFKA_TEST_TIMEOUT_MS); // produce and commit $producer->beginTransaction(); @@ -142,6 +142,7 @@ public function testTransaction(): void $topic->produce(0, 0, __METHOD__ . '3'); $producer->commitTransaction(KAFKA_TEST_TIMEOUT_MS); + $producer->poll(KAFKA_TEST_TIMEOUT_MS); // produce and abort $producer->beginTransaction(); @@ -151,8 +152,7 @@ public function testTransaction(): void $topic->produce(0, 0, __METHOD__ . '6'); $producer->abortTransaction(KAFKA_TEST_TIMEOUT_MS); - - $producer->flush(KAFKA_TEST_TIMEOUT_MS); + $producer->poll(KAFKA_TEST_TIMEOUT_MS); $consumerConf = new Conf(); $consumerConf->set('bootstrap.servers', KAFKA_BROKERS);