Fix tests; Tests run in their own directory

This commit is contained in:
Jae Kwon
2016-03-06 15:05:50 -08:00
parent fd85d0ef35
commit 03115cbf93
11 changed files with 53 additions and 33 deletions

View File

@ -11,7 +11,7 @@ import (
dbm "github.com/tendermint/go-db"
"github.com/tendermint/go-events"
bc "github.com/tendermint/tendermint/blockchain"
_ "github.com/tendermint/tendermint/config/tendermint_test"
"github.com/tendermint/tendermint/config/tendermint_test"
mempl "github.com/tendermint/tendermint/mempool"
"github.com/tendermint/tendermint/proxy"
sm "github.com/tendermint/tendermint/state"
@ -25,6 +25,7 @@ var chainID string
var ensureTimeout = time.Duration(2)
func init() {
tendermint_test.ResetConfig("consensus_common_test")
chainID = config.GetString("chain_id")
}

View File

@ -1,12 +1,16 @@
package consensus
import (
_ "github.com/tendermint/tendermint/config/tendermint_test"
"github.com/tendermint/tendermint/config/tendermint_test"
"github.com/tendermint/tendermint/types"
"testing"
)
func init() {
tendermint_test.ResetConfig("consensus_height_vote_set_test")
}
func TestPeerCatchupRounds(t *testing.T) {
valSet, privVals := types.RandValidatorSet(10, 1)

View File

@ -50,8 +50,6 @@ func TestReplayCatchup(t *testing.T) {
t.Fatalf("Error on catchup replay %v", err)
}
cs.enterNewRound(cs.Height, cs.Round)
after := time.After(time.Second * 2)
select {
case <-newBlockCh:

View File

@ -6,11 +6,15 @@ import (
"testing"
"time"
_ "github.com/tendermint/tendermint/config/tendermint_test"
"github.com/tendermint/tendermint/config/tendermint_test"
//"github.com/tendermint/go-events"
"github.com/tendermint/tendermint/types"
)
func init() {
tendermint_test.ResetConfig("consensus_state_test")
}
func (tp *TimeoutParams) ensureProposeTimeout() time.Duration {
return time.Duration(tp.Propose0*2) * time.Millisecond
}