mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
25 lines
294 B
Go
25 lines
294 B
Go
|
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()
|
||
|
}
|
||
|
|
||
|
}
|