Skip to content

Commit

Permalink
Tweak Producer transaction test
Browse files Browse the repository at this point in the history
  • Loading branch information
dirx committed Oct 24, 2021
1 parent 5794f71 commit 56c9b81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/RdKafka/ProducerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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);
Expand Down

0 comments on commit 56c9b81

Please sign in to comment.