tendermint/blockchain/v2/routines_test.go
Sean Braithwaite fa60855cca toy example
2019-07-27 10:58:58 +02:00

23 lines
297 B
Go

package v2
import (
"fmt"
"testing"
"time"
)
func TestReactor(t *testing.T) {
reactor := DummyReactor{}
reactor.Start()
script := Events{
testEvent{},
}
for _, event := range script {
reactor.Receive(event)
}
fmt.Println("sleeping")
time.Sleep(5 * time.Second)
reactor.Stop()
}