diff options
author | Wolfy-J <[email protected]> | 2019-12-23 14:43:47 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-12-23 14:43:47 +0300 |
commit | c7b0a4a81827284f7565c56aa476eea34fb6382f (patch) | |
tree | ee30e93169c37fb058fbe55af6b3f954eabd9646 /server_test.go | |
parent | 7f694966730f6dac09d0d0ea3bf51276b8e4dfe4 (diff) |
- test fixes
Diffstat (limited to 'server_test.go')
-rw-r--r-- | server_test.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/server_test.go b/server_test.go index c973d634..9ab480b1 100644 --- a/server_test.go +++ b/server_test.go @@ -205,7 +205,10 @@ func TestServer_ReplacePool(t *testing.T) { } }) - rr.Reset() + err := rr.Reset() + if err != nil { + t.Errorf("error resetting the pool: error %v", err) + } <-constructed for _, w := range rr.Workers() { @@ -239,9 +242,11 @@ func TestServer_ServerFailure(t *testing.T) { rr.pool.(*StaticPool).cmd = func() *exec.Cmd { return exec.Command("php", "tests/client.php", "echo", "broken-connection") } - // killing random worker and expecting pool to replace it - rr.Workers()[0].cmd.Process.Kill() + err := rr.Workers()[0].cmd.Process.Kill() + if err != nil { + t.Errorf("error killing the process: error %v", err) + } <-failure assert.True(t, true) |