Skip to content

Commit

Permalink
fix: restore test code
Browse files Browse the repository at this point in the history
  • Loading branch information
Woosang Son committed Jun 10, 2020
1 parent 33043e0 commit dec47e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions blockchain/v1/peer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestPeerResetBlockResponseTimer(t *testing.T) {
lastErr error // last generated error
peerTestMtx sync.Mutex // modifications of ^^ variables are also done from timer handler goroutine
)
params := &BpPeerParams{timeout: 5 * time.Millisecond}
params := &BpPeerParams{timeout: 2 * time.Millisecond}

peer := NewBpPeer(
p2p.ID(tmrand.Str(12)), 0, 10,
Expand Down Expand Up @@ -60,7 +60,7 @@ func TestPeerResetBlockResponseTimer(t *testing.T) {
assert.NotNil(t, peer.blockResponseTimer)

// let the timer expire and ...
time.Sleep(7 * time.Millisecond)
time.Sleep(3 * time.Millisecond)
// ... check timer is not running
checkByStoppingPeerTimer(t, peer, false)

Expand Down
2 changes: 1 addition & 1 deletion consensus/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type cleanupFunc func()
// genesis, chain_id, priv_val
var config *cfg.Config // NOTE: must be reset for each _test.go file
var consensusReplayConfig *cfg.Config
var ensureTimeout = time.Millisecond * 200
var ensureTimeout = time.Millisecond * 100

func ensureDir(dir string, mode os.FileMode) {
if err := tmos.EnsureDir(dir, mode); err != nil {
Expand Down

0 comments on commit dec47e5

Please sign in to comment.