diff options
author | Valery Piashchynski <[email protected]> | 2021-03-28 14:00:54 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-03-28 14:00:54 +0300 |
commit | 2a58b1be2c79f2fe10c0a429878937661645a928 (patch) | |
tree | f3a7cd472c75c4dd2a97bcf97cb154731ed81230 /pkg/pool/static_pool_test.go | |
parent | 970014530a23d57a3be41c6369ac6456d0b36ae1 (diff) |
- Fix bug with the worker reallocating during the response
- Update .golangci and fix new warnings
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg/pool/static_pool_test.go')
-rwxr-xr-x | pkg/pool/static_pool_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/pool/static_pool_test.go b/pkg/pool/static_pool_test.go index b1318f9d..2d8aad48 100755 --- a/pkg/pool/static_pool_test.go +++ b/pkg/pool/static_pool_test.go @@ -213,7 +213,7 @@ func Test_StaticPool_Broken_FromOutside(t *testing.T) { } } - var cfg = Config{ + var cfg2 = Config{ NumWorkers: 1, AllocateTimeout: time.Second * 5, DestroyTimeout: time.Second * 5, @@ -223,7 +223,7 @@ func Test_StaticPool_Broken_FromOutside(t *testing.T) { ctx, func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "echo", "pipes") }, pipe.NewPipeFactory(), - cfg, + cfg2, AddListeners(listener), ) assert.NoError(t, err) @@ -361,7 +361,7 @@ func Test_StaticPool_Stop_Worker(t *testing.T) { pipe.NewPipeFactory(), Config{ NumWorkers: 1, - AllocateTimeout: time.Second, + AllocateTimeout: time.Second * 100, DestroyTimeout: time.Second, }, ) @@ -432,8 +432,8 @@ func Test_Static_Pool_Destroy_And_Close_While_Wait(t *testing.T) { assert.NoError(t, err) go func() { - _, err := p.Exec(payload.Payload{Body: []byte("100")}) - if err != nil { + _, errP := p.Exec(payload.Payload{Body: []byte("100")}) + if errP != nil { t.Errorf("error executing payload: error %v", err) } }() |