summaryrefslogtreecommitdiff
path: root/util/state_test.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-10-13 13:55:20 +0300
committerValery Piashchynski <[email protected]>2020-10-13 13:55:20 +0300
commit0dc44d54cfcc9dd3fa09a41136f35a9a8d26b994 (patch)
treeffcb65010bebe9f5b5436192979e64b2402a6ec0 /util/state_test.go
parent08d6b6b7f773f83b286cd48c1a0fbec9a62fb42b (diff)
Initial commit of RR 2.0v2.0.0-alpha1
Diffstat (limited to 'util/state_test.go')
-rw-r--r--util/state_test.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/util/state_test.go b/util/state_test.go
deleted file mode 100644
index 2afe682e..00000000
--- a/util/state_test.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package util
-
-import (
- "github.com/spiral/roadrunner"
- "github.com/stretchr/testify/assert"
- "runtime"
- "testing"
- "time"
-)
-
-func TestServerState(t *testing.T) {
- rr := roadrunner.NewServer(
- &roadrunner.ServerConfig{
- Command: "php ../tests/client.php echo tcp",
- Relay: "tcp://:9007",
- RelayTimeout: 10 * time.Second,
- Pool: &roadrunner.Config{
- NumWorkers: int64(runtime.NumCPU()),
- AllocateTimeout: time.Second,
- DestroyTimeout: time.Second,
- },
- })
- defer rr.Stop()
-
- assert.NoError(t, rr.Start())
-
- state, err := ServerState(rr)
- assert.NoError(t, err)
-
- assert.Len(t, state, runtime.NumCPU())
-}
-
-func TestServerState_Err(t *testing.T) {
- _, err := ServerState(nil)
- assert.Error(t, err)
-}