Skip to content

Commit

Permalink
Add a sleep to the blockchain test
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethengelman committed Feb 14, 2019
1 parent 7995c5a commit 4d6ddf9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions statediff/testhelpers/mocks/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package mocks
import (
"errors"

"time"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
Expand Down Expand Up @@ -45,6 +47,7 @@ func (bc *BlockChain) SubscribeChainEvent(ch chan<- core.ChainEvent) event.Subsc
subscription := event.NewSubscription(func(quit <-chan struct{}) error {
for _, chainEvent := range bc.ChainEvents {
if eventCounter > 1 {
time.Sleep(250 * time.Millisecond)
return subErr
}
select {
Expand Down

0 comments on commit 4d6ddf9

Please sign in to comment.