summaryrefslogtreecommitdiff
path: root/server_test.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-06 18:39:13 +0300
committerWolfy-J <[email protected]>2018-06-06 18:39:13 +0300
commitbec26268144a4186a75e7a195ddb8e1dad5fb1d7 (patch)
treed401b1031165b31669529822fb90353cc641cbbd /server_test.go
parentb8dc7cf3b90f5290edf67eb997f01e213e987265 (diff)
dead functions
Diffstat (limited to 'server_test.go')
-rw-r--r--server_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/server_test.go b/server_test.go
index 8fecd927..d309f0d0 100644
--- a/server_test.go
+++ b/server_test.go
@@ -95,6 +95,21 @@ func TestServer_Configure_BeforeStart(t *testing.T) {
assert.Len(t, srv.Workers(), 2)
}
+func TestServer_StopUnstarted(t *testing.T) {
+ srv := NewServer(
+ func() *exec.Cmd { return exec.Command("php", "php-src/tests/client.php", "echo", "pipes") },
+ &ServerConfig{
+ Relay: "pipes",
+ Pool: Config{
+ NumWorkers: uint64(runtime.NumCPU()),
+ AllocateTimeout: time.Second,
+ DestroyTimeout: time.Second,
+ },
+ })
+ assert.NoError(t, srv.Stop())
+ assert.Nil(t, srv.Workers())
+}
+
func TestServer_Reconfigure(t *testing.T) {
srv := NewServer(
func() *exec.Cmd { return exec.Command("php", "php-src/tests/client.php", "echo", "pipes") },