summaryrefslogtreecommitdiff
path: root/static_pool_test.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2020-10-26 21:25:33 +0300
committerWolfy-J <[email protected]>2020-10-26 21:25:33 +0300
commit722584b153c009612ccbaf1fb7a9911f7afae476 (patch)
treed9fab8f2fbee3737668caf4657affab605fb4146 /static_pool_test.go
parent6d3bd7d47aa9d08847eecfb241298f323aae05ca (diff)
- lazy load test
Diffstat (limited to 'static_pool_test.go')
-rwxr-xr-xstatic_pool_test.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/static_pool_test.go b/static_pool_test.go
index c9a43f69..ffa39c2f 100755
--- a/static_pool_test.go
+++ b/static_pool_test.go
@@ -308,7 +308,7 @@ func Test_StaticPool_Debug_Worker(t *testing.T) {
func() *exec.Cmd { return exec.Command("php", "tests/client.php", "pid", "pipes") },
NewPipeFactory(),
Config{
- Deferred: true,
+ HeavyLoad: true,
NumWorkers: 1,
MaxJobs: 1,
AllocateTimeout: time.Second,
@@ -320,15 +320,10 @@ func Test_StaticPool_Debug_Worker(t *testing.T) {
assert.NotNil(t, p)
- assert.Len(t, p.Workers(), 0)
+ assert.Len(t, p.Workers(), 1)
var lastPID string
res, _ := p.Exec(Payload{Body: []byte("hello")})
-
- assert.Len(t, p.Workers(), 1)
-
- lastPID = strconv.Itoa(int(p.Workers()[0].Pid()))
- res, _ = p.Exec(Payload{Body: []byte("hello")})
assert.NotEqual(t, lastPID, string(res.Body))
for i := 0; i < 10; i++ {