add fixes for flaky tests (#5146)

While working on tendermint my colleague @jinmannwong fixed a few of the unit tests that we found to be flaky in our CI. We thought that you might find this useful, see below for comments.
This commit is contained in:
n-hutton
2020-07-27 07:36:56 +01:00
committed by GitHub
parent 940e68292c
commit 375f0c819f
4 changed files with 38 additions and 28 deletions

View File

@@ -196,7 +196,10 @@ func TestBadBlockStopsPeer(t *testing.T) {
maxBlockHeight := int64(148)
otherChain := newBlockchainReactor(log.TestingLogger(), genDoc, privVals, maxBlockHeight)
// Other chain needs a different validator set
otherGenDoc, otherPrivVals := randGenesisDoc(1, false, 30)
otherChain := newBlockchainReactor(log.TestingLogger(), otherGenDoc, otherPrivVals, maxBlockHeight)
defer func() {
err := otherChain.reactor.Stop()
require.Error(t, err)