From 3308ac7d8393c991914458bb30894f9f2e72a822 Mon Sep 17 00:00:00 2001 From: Anton Kalyaev Date: Thu, 5 Jan 2017 00:06:11 +0400 Subject: [PATCH] set skip_timeout_commit to true for tests For the tests its better to not use the timeout_commit, and to wait for all the votes, because otherwise we can end up with timing dependencies in the testing code which can lead to nondeterministic failures. That was part of the reason for this change originally. --- config/tendermint_test/config.go | 2 +- consensus/reactor_test.go | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/config/tendermint_test/config.go b/config/tendermint_test/config.go index 2913546c5..421c0017b 100644 --- a/config/tendermint_test/config.go +++ b/config/tendermint_test/config.go @@ -98,7 +98,7 @@ func ResetConfig(localPath string) cfg.Config { mapConfig.SetDefault("timeout_precommit", 10) mapConfig.SetDefault("timeout_precommit_delta", 1) mapConfig.SetDefault("timeout_commit", 10) - mapConfig.SetDefault("skip_timeout_commit", false) + mapConfig.SetDefault("skip_timeout_commit", true) mapConfig.SetDefault("mempool_recheck", true) mapConfig.SetDefault("mempool_recheck_empty", true) mapConfig.SetDefault("mempool_broadcast", true) diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index d7fd3ba5d..29391c290 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -150,11 +150,6 @@ func TestValidatorSetChanges(t *testing.T) { nVals := 4 css := randConsensusNetWithPeers(nVals, nPeers, "consensus_val_set_changes_test", newMockTickerFunc(true), newPersistentDummy) - // otherwise, the test is failing with timeout error - for i := 0; i < nPeers; i++ { - css[i].timeoutParams.SkipCommit0 = true - } - reactors := make([]*ConsensusReactor, nPeers) eventChans := make([]chan interface{}, nPeers) for i := 0; i < nPeers; i++ {