Skip to content

Commit

Permalink
test(mepmpool): increase TestTxMempool_OneRecheckTxAtTime timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Mar 12, 2024
1 parent 69abbeb commit 92928f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/mempool/mempool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ func TestTxMempool_OneRecheckTxAtTime(t *testing.T) {
mp.recheckTransactions(ctx)
assert.Eventually(t,
func() bool { return checkTxCounter.Load() == uint32(numRecheckTasks) },
100*time.Millisecond, 5*time.Millisecond,
200*time.Millisecond, 10*time.Millisecond,
"1st run: processed %d txs, expected %d", checkTxCounter.Load(), numRecheckTasks)

// another recheck should cancel the first run and start from the beginning , but pending checkTx ops should finish
Expand All @@ -809,7 +809,7 @@ func TestTxMempool_OneRecheckTxAtTime(t *testing.T) {
recheckTxBlocker.Unlock()
// Ensure that all goroutines/tasks have finished
assert.Eventually(t, func() bool { return runtime.NumGoroutine() == goroutines },
100*time.Millisecond, 5*time.Millisecond,
500*time.Millisecond, 10*time.Millisecond,
"not all goroutines finished on time")

// here we expect to have processed `numRecheckTasks` during first run, and `numTxs` during 2nd run
Expand Down

0 comments on commit 92928f2

Please sign in to comment.