From 12d13cd31d9ce76e72ebed71798b47944482c1d5 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Fri, 18 Mar 2022 12:55:10 -0400 Subject: [PATCH] mempool: reduce size of test (#8152) This is failing intermittently, but it's a really simple test, and I suspect that we're just running into thread scheduling issues on CI nodes. I don't think making the test smaller reduces the utility of this test. --- internal/mempool/reactor_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/mempool/reactor_test.go b/internal/mempool/reactor_test.go index dab63af73..64a8adca1 100644 --- a/internal/mempool/reactor_test.go +++ b/internal/mempool/reactor_test.go @@ -139,14 +139,14 @@ func (rts *reactorTestSuite) waitForTxns(t *testing.T, txs []types.Tx, ids ...ty } wg.Add(1) - go func(pool *TxMempool) { + go func(name types.NodeID, pool *TxMempool) { defer wg.Done() require.Eventually(t, func() bool { return len(txs) == pool.Size() }, time.Minute, 250*time.Millisecond, - "ntx=%d, size=%d", len(txs), pool.Size(), + "node=%q, ntx=%d, size=%d", name, len(txs), pool.Size(), ) - }(pool) + }(name, pool) } wg.Wait() } @@ -196,8 +196,8 @@ func TestReactorBroadcastDoesNotPanic(t *testing.T) { } func TestReactorBroadcastTxs(t *testing.T) { - numTxs := 1000 - numNodes := 10 + numTxs := 512 + numNodes := 4 ctx, cancel := context.WithCancel(context.Background()) defer cancel()