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