diff options
author | Wolfy-J <[email protected]> | 2018-01-28 18:57:25 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-01-28 18:57:25 +0300 |
commit | 71a040f5ee98d91e9f388b0d4509adf8d5589bb9 (patch) | |
tree | 0af48d1887b8cbba00277cfcb61ac9ebdd9661e8 /pool_test.go | |
parent | e065b650ad2d3b0c58fe73fa75c9f730a36eee86 (diff) |
Context
Diffstat (limited to 'pool_test.go')
-rw-r--r-- | pool_test.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pool_test.go b/pool_test.go index 8b936059..db38cbc4 100644 --- a/pool_test.go +++ b/pool_test.go @@ -149,13 +149,17 @@ func Test_Pool_Broken_Replace(t *testing.T) { assert.NotNil(t, p) assert.NoError(t, err) + + p.EventHandler = func(e int, w *Worker, ctx interface{}) { + if err, ok := ctx.(error); ok { + assert.Contains(t, err.Error(), "undefined_function()") + } + } res, err := p.Exec(&Payload{Body: []byte("hello")}) assert.Error(t, err) assert.Nil(t, res) - - // todo: handle error in even log } func Test_Pool_AllocateTimeout(t *testing.T) { |