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:
parent
a1fd312bb1
commit
3308ac7d83
|
@ -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)
|
||||||
|
|
|
@ -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++ {
|
||||||
|
|
Loading…
Reference in New Issue