Skip to content

Commit

Permalink
tests: do not set transaction timeout in tests that do not need it
Browse files Browse the repository at this point in the history
Most of our transactions tests were build based with the same code which
often were copy pasted. The test were setting the default transaction
timeout to 10 seconds as they might have been based on the test that
validated the transactions expiration. Updated the tests to make sure
that the timeout is set in the test that need it.

The timeout made some tests to fail intermittently.

Fixes: redpanda-data#18184

Signed-off-by: Michał Maślanka <michal@redpanda.com>
  • Loading branch information
mmaslankaprv committed Jun 28, 2024
1 parent 65f6b39 commit 797ac33
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
10 changes: 0 additions & 10 deletions tests/rptest/transactions/transactions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ def init_transactions_creates_eos_topics_test(self):
producer = ck.Producer({
'bootstrap.servers': self.redpanda.brokers(),
'transactional.id': '0',
'transaction.timeout.ms': 10000,
})

producer.init_transactions()
Expand All @@ -198,7 +197,6 @@ def simple_test(self):
producer = ck.Producer({
'bootstrap.servers': self.redpanda.brokers(),
'transactional.id': '0',
'transaction.timeout.ms': 10000,
})

consumer1 = ck.Consumer({
Expand Down Expand Up @@ -276,7 +274,6 @@ def rejoin_member_test(self):
producer = ck.Producer({
'bootstrap.servers': self.redpanda.brokers(),
'transactional.id': '0',
'transaction.timeout.ms': 10000,
})

group_name = "test"
Expand Down Expand Up @@ -334,7 +331,6 @@ def change_static_member_test(self):
producer = ck.Producer({
'bootstrap.servers': self.redpanda.brokers(),
'transactional.id': '0',
'transaction.timeout.ms': 10000,
})

group_name = "test"
Expand Down Expand Up @@ -951,7 +947,6 @@ def consumer_offsets_retention_test(self):
producer_conf = {
'bootstrap.servers': self.redpanda.brokers(),
'transactional.id': 'streams',
'transaction.timeout.ms': 10000,
}
producer = ck.Producer(producer_conf)
consumer_conf = {
Expand Down Expand Up @@ -1137,7 +1132,6 @@ def init_transactions_authz_test(self):
producer_cfg = {
'bootstrap.servers': self.redpanda.brokers(),
'transactional.id': '0',
'transaction.timeout.ms': 10000,
}

user = self.USER_1
Expand Down Expand Up @@ -1166,7 +1160,6 @@ def simple_authz_test(self):
producer_cfg = {
'bootstrap.servers': self.redpanda.brokers(),
'transactional.id': '0',
'transaction.timeout.ms': 10000,
}
consumer_cfg = {
'bootstrap.servers': self.redpanda.brokers(),
Expand Down Expand Up @@ -1352,7 +1345,6 @@ def do_upgrade_with_tx(self, selector):
producer = ck.Producer({
'bootstrap.servers': self.redpanda.brokers(),
'transactional.id': '0',
'transaction.timeout.ms': 10000,
})

producer.init_transactions()
Expand All @@ -1375,7 +1367,6 @@ def do_upgrade_with_tx(self, selector):
producer = ck.Producer({
'bootstrap.servers': self.redpanda.brokers(),
'transactional.id': '0',
'transaction.timeout.ms': 10000,
})

producer.init_transactions()
Expand Down Expand Up @@ -1457,7 +1448,6 @@ def delivery_callback(err, msg):
producer = ck.Producer({
'bootstrap.servers': self.redpanda.brokers(),
'transactional.id': self._tx_id(i),
'transaction.timeout.ms': 10000,
})
producer.init_transactions()
producer.begin_transaction()
Expand Down
1 change: 0 additions & 1 deletion tests/rptest/transactions/tx_coordinator_migration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def delivery_callback(err, msg):
producer = ck.Producer({
'bootstrap.servers': self.redpanda.brokers(),
'transactional.id': self._tx_id(i),
'transaction.timeout.ms': 10000,
})
producer.init_transactions()
producer.begin_transaction()
Expand Down

0 comments on commit 797ac33

Please sign in to comment.