You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
294 B

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()
}
}