From f8e558941bf9b6155bafec3e44451cfa9acf431e Mon Sep 17 00:00:00 2001 From: Emanuele Sabellico Date: Wed, 18 May 2022 16:58:00 +0200 Subject: [PATCH] Test 0103: AK < 2.5 needs sleep to synchronize committed txn offsets --- tests/0103-transactions.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/0103-transactions.c b/tests/0103-transactions.c index 1b6e1e1a..aa42f818 100644 --- a/tests/0103-transactions.c +++ b/tests/0103-transactions.c @@ -1003,6 +1003,10 @@ static void do_test_empty_txn(rd_bool_t send_offsets, rd_bool_t do_commit) { else TEST_CALL_ERROR__(rd_kafka_abort_transaction(p, -1)); + /* Wait before checking the committed offsets (Kafka < 2.5.0) */ + if (test_broker_version < TEST_BRKVER(2, 5, 0, 0)) + rd_usleep(tmout_multip(5000 * 1000), NULL); + /* Get the committed offsets */ TEST_CALL_ERR__(rd_kafka_assignment(c, &committed)); TEST_CALL_ERR__(rd_kafka_committed(c, committed, 10 * 1000));