From 2cda7779007a5c3fd38d6f924d14dea3ccb8d3a2 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Thu, 9 Nov 2017 23:54:02 +0000 Subject: [PATCH] consensus: make mempool_test deterministic --- consensus/mempool_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/consensus/mempool_test.go b/consensus/mempool_test.go index a46f2cdf8..3314caad1 100644 --- a/consensus/mempool_test.go +++ b/consensus/mempool_test.go @@ -26,11 +26,10 @@ func TestNoProgressUntilTxsAvailable(t *testing.T) { ensureNewStep(newBlockCh) // first block gets committed ensureNoNewStep(newBlockCh) - deliverTxsRange(cs, 0, 2) + deliverTxsRange(cs, 0, 1) ensureNewStep(newBlockCh) // commit txs ensureNewStep(newBlockCh) // commit updated app hash ensureNoNewStep(newBlockCh) - } func TestProgressAfterCreateEmptyBlocksInterval(t *testing.T) { @@ -72,7 +71,7 @@ func TestProgressInHigherRound(t *testing.T) { ensureNewStep(newRoundCh) // first round at first height ensureNewStep(newBlockCh) // first block gets committed ensureNewStep(newRoundCh) // first round at next height - deliverTxsRange(cs, 0, 2) // we deliver txs, but dont set a proposal so we get the next round + deliverTxsRange(cs, 0, 1) // we deliver txs, but dont set a proposal so we get the next round <-timeoutCh ensureNewStep(newRoundCh) // wait for the next round ensureNewStep(newBlockCh) // now we can commit the block