@@ -522,7 +522,7 @@ func TestTxMempool_ConcurrentTxs(t *testing.T) {
522522
523523func TestTxMempool_ExpiredTxs_Timestamp (t * testing.T ) {
524524 txmp := setup (t , 5000 )
525- txmp .config .TTLDuration = 5 * time .Millisecond
525+ txmp .config .TTLDuration = 500 * time .Millisecond
526526
527527 added1 := checkTxs (t , txmp , 10 , 0 )
528528 require .Equal (t , len (added1 ), txmp .Size ())
@@ -531,19 +531,19 @@ func TestTxMempool_ExpiredTxs_Timestamp(t *testing.T) {
531531 // when the first batch TTLs out.
532532 //
533533 // ms: 0 1 2 3 4 5 6
534- // ^ ^ ^ ^
535- // | | | +-- Update (triggers pruning)
536- // | | +------ first batch expires
537- // | +---- ---------- second batch added
534+ // ^ ^ ^ ^
535+ // | | | +-- Update (triggers pruning)
536+ // | | +------ first batch expires
537+ // | + ---------- second batch added
538538 // +-------------------------- first batch added
539539 //
540540 // The exact intervals are not important except that the delta should be
541541 // large relative to the cost of CheckTx (ms vs. ns is fine here).
542- time .Sleep (3 * time .Millisecond )
542+ time .Sleep (400 * time .Millisecond )
543543 added2 := checkTxs (t , txmp , 10 , 1 )
544544
545545 // Wait a while longer, so that the first batch will expire.
546- time .Sleep (3 * time .Millisecond )
546+ time .Sleep (200 * time .Millisecond )
547547
548548 // Trigger an update so that pruning will occur.
549549 txmp .Lock ()
0 commit comments