summaryrefslogtreecommitdiff
path: root/pkg/pool/supervisor_test.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-08-18 17:26:42 +0300
committerGitHub <[email protected]>2021-08-18 17:26:42 +0300
commit324407b3e2d779143be65872993c4d091abb1d38 (patch)
treee6f0bd64241ab2d4dc05809128c8e8d7d74cbcc4 /pkg/pool/supervisor_test.go
parenta5435be8ab58bd23f1c2d3afd4484dd1d86b6002 (diff)
parenteb70b89cb2f23ccd44b91bbcac7438a05a40c801 (diff)
#764: feat(stat): `job` plugin drivers statistic
#764: feat(stat): `job` plugin drivers statistic
Diffstat (limited to 'pkg/pool/supervisor_test.go')
-rw-r--r--pkg/pool/supervisor_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkg/pool/supervisor_test.go b/pkg/pool/supervisor_test.go
index 0702a71f..d1b24574 100644
--- a/pkg/pool/supervisor_test.go
+++ b/pkg/pool/supervisor_test.go
@@ -39,6 +39,8 @@ func TestSupervisedPool_Exec(t *testing.T) {
assert.NoError(t, err)
assert.NotNil(t, p)
+ time.Sleep(time.Second)
+
pidBefore := p.Workers()[0].Pid()
for i := 0; i < 100; i++ {
@@ -63,7 +65,7 @@ func TestSupervisedPool_ExecWithDebugMode(t *testing.T) {
ctx := context.Background()
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/memleak.php", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../../tests/supervised.php") },
pipe.NewPipeFactory(),
cfgSupervised,
)
@@ -71,8 +73,10 @@ func TestSupervisedPool_ExecWithDebugMode(t *testing.T) {
assert.NoError(t, err)
assert.NotNil(t, p)
+ time.Sleep(time.Second)
+
for i := 0; i < 100; i++ {
- time.Sleep(time.Millisecond * 100)
+ time.Sleep(time.Millisecond * 500)
_, err = p.Exec(&payload.Payload{
Context: []byte(""),
Body: []byte("foo"),