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.
This commit is contained in:
Anton Kalyaev 2017-01-05 00:06:11 +04:00 committed by Ethan Buchman
parent a1fd312bb1
commit 3308ac7d83
2 changed files with 1 additions and 6 deletions

View File

@ -98,7 +98,7 @@ func ResetConfig(localPath string) cfg.Config {
mapConfig.SetDefault("timeout_precommit", 10) mapConfig.SetDefault("timeout_precommit", 10)
mapConfig.SetDefault("timeout_precommit_delta", 1) mapConfig.SetDefault("timeout_precommit_delta", 1)
mapConfig.SetDefault("timeout_commit", 10) 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", true)
mapConfig.SetDefault("mempool_recheck_empty", true) mapConfig.SetDefault("mempool_recheck_empty", true)
mapConfig.SetDefault("mempool_broadcast", true) mapConfig.SetDefault("mempool_broadcast", true)

View File

@ -150,11 +150,6 @@ func TestValidatorSetChanges(t *testing.T) {
nVals := 4 nVals := 4
css := randConsensusNetWithPeers(nVals, nPeers, "consensus_val_set_changes_test", newMockTickerFunc(true), newPersistentDummy) 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) reactors := make([]*ConsensusReactor, nPeers)
eventChans := make([]chan interface{}, nPeers) eventChans := make([]chan interface{}, nPeers)
for i := 0; i < nPeers; i++ { for i := 0; i < nPeers; i++ {