diff options
author | Wolfy-J <[email protected]> | 2020-10-26 21:25:33 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2020-10-26 21:25:33 +0300 |
commit | 722584b153c009612ccbaf1fb7a9911f7afae476 (patch) | |
tree | d9fab8f2fbee3737668caf4657affab605fb4146 /static_pool_test.go | |
parent | 6d3bd7d47aa9d08847eecfb241298f323aae05ca (diff) |
- lazy load test
Diffstat (limited to 'static_pool_test.go')
-rwxr-xr-x | static_pool_test.go | 9 |
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++ { |