diff options
Diffstat (limited to 'socket_factory_test.go')
-rw-r--r-- | socket_factory_test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/socket_factory_test.go b/socket_factory_test.go index e718f6c2..9f74cf8c 100644 --- a/socket_factory_test.go +++ b/socket_factory_test.go @@ -191,11 +191,10 @@ func Test_Tcp_Broken(t *testing.T) { assert.Error(t, err) assert.Contains(t, err.Error(), "undefined_function()") }() + defer func() { err = w.Stop() - if err != nil { - t.Errorf("error stopping the worker: error %v", err) - } + assert.Error(t, err) }() res, err := w.Exec(&Payload{Body: []byte("hello")}) |