diff options
author | Wolfy-J <[email protected]> | 2019-12-23 15:25:47 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-12-23 15:25:47 +0300 |
commit | a9e14d2cf30fd467dba6f332e22408b39abdcc73 (patch) | |
tree | 607ccef917a4f165273888b9f11f840ebb9b1d24 | |
parent | d39e20a58c8a40eefe6e5d6761f78f38f024b46e (diff) |
- check before erasing unix sock
-rw-r--r-- | socket_factory_test.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/socket_factory_test.go b/socket_factory_test.go index 9f74cf8c..8beb3fc6 100644 --- a/socket_factory_test.go +++ b/socket_factory_test.go @@ -370,15 +370,13 @@ func Test_Unix_Broken(t *testing.T) { w, _ := NewSocketFactory(ls, time.Minute).SpawnWorker(cmd) go func() { err := w.Wait() - 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")}) |