Skip to content

Commit

Permalink
tests: updated list_transactions_test to test all reported fields
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Maslanka <michal@redpanda.com>
  • Loading branch information
mmaslankaprv committed Nov 8, 2023
1 parent 1066daa commit 6682961
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/rptest/tests/transaction_kafka_api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ def test_list_transactions(self):

txs_info = self.kafka_cli.list_transactions()
assert len(txs_info) > 0
for tx in txs_info:
tx_info = self.kafka_cli.describe_transaction(
tx["TransactionalId"])
assert int(tx_info["ProducerId"]) == int(tx["ProducerId"])
for tx_from_list in txs_info:
tx_from_describe = self.kafka_cli.describe_transaction(
tx_from_list["TransactionalId"])

for f in ["TransactionalId", "TransactionState", "ProducerId"]:
assert tx_from_describe[f] == tx_from_list[f]
assert tx_from_list["TransactionState"] != "Unknown"

0 comments on commit 6682961

Please sign in to comment.