parallel test causes deadlock

This commit is contained in:
Asim Aslam 2018-03-13 18:50:58 +00:00
parent dca078f30b
commit a941a4772b

View File

@ -30,15 +30,8 @@ func TestService(t *testing.T) {
// we can't test service.Init as it parses the command line
// service.Init()
t.Run("Run", func(t *testing.T) {
t.Parallel()
// run service
service.Run()
})
t.Run("Debug.Health", func(t *testing.T) {
t.Parallel()
go service.Run()
// wait for start
wg.Wait()
@ -63,5 +56,4 @@ func TestService(t *testing.T) {
// shutdown the service
cancel()
})
}