diff options
Diffstat (limited to 'static_pool_test.go')
-rw-r--r-- | static_pool_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/static_pool_test.go b/static_pool_test.go index 3fd8dc78..59822186 100644 --- a/static_pool_test.go +++ b/static_pool_test.go @@ -151,11 +151,10 @@ func Test_StaticPool_Broken_Replace(t *testing.T) { cfg, ) assert.NoError(t, err) - defer p.Destroy() - assert.NotNil(t, p) done := make(chan interface{}) + p.Listen(func(e int, ctx interface{}) { if err, ok := ctx.(error); ok { if strings.Contains(err.Error(), "undefined_function()") { @@ -170,8 +169,10 @@ func Test_StaticPool_Broken_Replace(t *testing.T) { assert.Nil(t, res) <-done + p.Destroy() } + func Test_StaticPool_Broken_FromOutside(t *testing.T) { p, err := NewPool( func() *exec.Cmd { return exec.Command("php", "tests/client.php", "echo", "pipes") }, |