Skip to content

Commit 2bc8c4d

Browse files
committed
txn test: bump transactional timeout
In race mode on laptops with low memory, transactions can take a while and then timeout. Bump the timeout to help alleviate this.
1 parent 4fb0de2 commit 2bc8c4d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: pkg/kgo/txn_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func TestTxnEtl(t *testing.T) {
3030
cl, err := NewClient(
3131
WithLogger(BasicLogger(os.Stderr, testLogLevel, nil)),
3232
TransactionalID("p"+randsha()),
33+
TransactionTimeout(2*time.Minute),
3334
)
3435
if err != nil {
3536
panic(err)
@@ -140,6 +141,7 @@ func (c *testConsumer) transact(txnsBeforeQuit int) {
140141
defer c.wg.Done()
141142
txnSess, _ := NewGroupTransactSession(
142143
TransactionalID(randsha()),
144+
TransactionTimeout(2*time.Minute),
143145
WithLogger(testLogger()),
144146
// Control records have their own unique offset, so for testing,
145147
// we keep the record to ensure we do not doubly consume control

0 commit comments

Comments
 (0)