diff options
author | Valery Piashchynski <[email protected]> | 2020-11-27 00:35:15 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-11-27 00:35:15 +0300 |
commit | fa9a7e319b5ac6d98fd18d1e4986de35fde254e5 (patch) | |
tree | 559908f3a491a15bb4926f79dbfde350ec7d4c40 /static_pool_test.go | |
parent | 46ae5dcc22d971b0f909bce23ec8fdef26811ed6 (diff) |
Add new pool event: EventNoFreeWorkers which indicates than RR can't get
worker from the stack during the allowed allocate timeout.
Diffstat (limited to 'static_pool_test.go')
-rwxr-xr-x | static_pool_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/static_pool_test.go b/static_pool_test.go index e97e2034..2823cbc4 100755 --- a/static_pool_test.go +++ b/static_pool_test.go @@ -153,7 +153,7 @@ func Test_StaticPool_JobError(t *testing.T) { assert.Nil(t, res.Body) assert.Nil(t, res.Context) - if errors.Is(errors.Exec, err) == false { + if errors.Is(errors.ErrSoftJob, err) == false { t.Fatal("error should be of type errors.Exec") } @@ -273,6 +273,9 @@ func Test_StaticPool_AllocateTimeout(t *testing.T) { }, ) assert.Error(t, err) + if !errors.Is(errors.WorkerAllocate, err) { + t.Fatal("error should be of type WorkerAllocate") + } assert.Nil(t, p) } |