diff options
author | Valery Piashchynski <[email protected]> | 2020-02-27 18:02:11 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-02-27 18:02:11 +0300 |
commit | 926f6f278362ca16ba649849708e9b03496fa41a (patch) | |
tree | 4f1510068a77e6b84ef407dc0f2ac88ff6c5df53 /socket_factory_test.go | |
parent | a368be6c68c2837b81789530836ca66cde605ff2 (diff) |
Test fix for tests
Diffstat (limited to 'socket_factory_test.go')
-rw-r--r-- | socket_factory_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/socket_factory_test.go b/socket_factory_test.go index b2bb3ef1..afd6df75 100644 --- a/socket_factory_test.go +++ b/socket_factory_test.go @@ -105,8 +105,8 @@ func Test_Tcp_Failboot(t *testing.T) { ls, err := net.Listen("tcp", "localhost:9007") if assert.NoError(t, err) { defer func() { - err := ls.Close() - if err != nil { + err3 := ls.Close() + if err3 != nil { t.Errorf("error closing the listener: error %v", err) } }() @@ -116,10 +116,10 @@ func Test_Tcp_Failboot(t *testing.T) { cmd := exec.Command("php", "tests/failboot.php") - w, err := NewSocketFactory(ls, time.Minute).SpawnWorker(cmd) + w, err2 := NewSocketFactory(ls, time.Minute).SpawnWorker(cmd) assert.Nil(t, w) - assert.Error(t, err) - assert.Contains(t, err.Error(), "failboot") + assert.Error(t, err2) + assert.Contains(t, err2.Error(), "failboot") } func Test_Tcp_Timeout(t *testing.T) { |