tendermint/common/service_test.go

25 lines
294 B
Go
Raw Normal View History

2016-10-28 12:09:22 -07:00
package common
import (
"testing"
)
func TestBaseServiceWait(t *testing.T) {
type TestService struct {
BaseService
}
ts := &TestService{}
ts.BaseService = *NewBaseService(nil, "TestService", ts)
ts.Start()
go func() {
ts.Stop()
}()
for i := 0; i < 10; i++ {
ts.Wait()
}
}