KAFKA-10235 Fix flaky transactions_test.py (#8981)

Reducing timeout of transaction to clean up the unstable offsets quicker. IN hard_bounce mode, transactional client is killed ungracefully. Hence, it produces unstable offsets which obstructs TransactionalMessageCopier from receiving position of group.

Reviewers: Jun Rao <junrao@gmail.com>
This commit is contained in:
Chia-Ping Tsai 2020-07-10 00:33:07 +08:00 committed by GitHub
parent faf96fa771
commit e099b58df5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -47,7 +47,11 @@ class TransactionsTest(Test):
self.num_output_partitions = 3
self.num_seed_messages = 100000
self.transaction_size = 750
self.transaction_timeout = 40000
# The timeout of transaction should be lower than the timeout of verification. The transactional message sent by
# client may be not correctly completed in hard_bounce mode. The pending transaction (unstable offset) stored by
# broker obstructs TransactionMessageCopier from getting offset of partition which is used to calculate
# remaining messages after restarting.
self.transaction_timeout = 5000
self.consumer_group = "transactions-test-consumer-group"
self.zk = ZookeeperService(test_context, num_nodes=1)