summaryrefslogtreecommitdiff
path: root/server_test.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-12-23 14:43:47 +0300
committerWolfy-J <[email protected]>2019-12-23 14:43:47 +0300
commitc7b0a4a81827284f7565c56aa476eea34fb6382f (patch)
treeee30e93169c37fb058fbe55af6b3f954eabd9646 /server_test.go
parent7f694966730f6dac09d0d0ea3bf51276b8e4dfe4 (diff)
- test fixes
Diffstat (limited to 'server_test.go')
-rw-r--r--server_test.go11
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)