diff options
author | Valery Piashchynski <[email protected]> | 2021-02-24 00:12:05 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-02-24 00:12:05 +0300 |
commit | e684ac16035bed9a4c09677b0db3b33477955dc9 (patch) | |
tree | 0d226eb8ad9730ede1f7cd80b5f7b44d1fb23b0a /pkg/pool/static_pool_test.go | |
parent | 18a097292a567fccdd02304ff236bf78d769965d (diff) |
Fix pool behavior, update tests
Diffstat (limited to 'pkg/pool/static_pool_test.go')
-rwxr-xr-x | pkg/pool/static_pool_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/pool/static_pool_test.go b/pkg/pool/static_pool_test.go index c8b3616c..b1318f9d 100755 --- a/pkg/pool/static_pool_test.go +++ b/pkg/pool/static_pool_test.go @@ -191,7 +191,7 @@ func Test_StaticPool_Broken_Replace(t *testing.T) { assert.NotNil(t, p) time.Sleep(time.Second) - res, err := p.ExecWithContext(ctx, payload.Payload{Body: []byte("hello")}) + res, err := p.execWithTTL(ctx, payload.Payload{Body: []byte("hello")}) assert.Error(t, err) assert.Nil(t, res.Context) assert.Nil(t, res.Body) @@ -518,11 +518,11 @@ func Test_StaticPool_NoFreeWorkers(t *testing.T) { assert.NotNil(t, p) go func() { - _, _ = p.ExecWithContext(ctx, payload.Payload{Body: []byte("hello")}) + _, _ = p.execWithTTL(ctx, payload.Payload{Body: []byte("hello")}) }() time.Sleep(time.Second) - res, err := p.ExecWithContext(ctx, payload.Payload{Body: []byte("hello")}) + res, err := p.execWithTTL(ctx, payload.Payload{Body: []byte("hello")}) assert.Error(t, err) assert.Nil(t, res.Context) assert.Nil(t, res.Body) |