mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-30 13:11:38 +00:00
QuitService->BaseService
This commit is contained in:
24
service_test.go
Normal file
24
service_test.go
Normal file
@ -0,0 +1,24 @@
|
||||
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()
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user