summaryrefslogtreecommitdiff
path: root/static_pool_test.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-02-28 10:48:34 +0300
committerValery Piashchynski <[email protected]>2020-02-28 10:48:34 +0300
commit33f92daae1ecf9b9388cf3adb22a0efd2c3467d9 (patch)
tree1c6a84526a1e879f0d96e1bf219ab74a19d2731d /static_pool_test.go
parentb3c8c7170bb9a7d5b218faf84d7a5f17cb15404d (diff)
Update service_tests
Diffstat (limited to 'static_pool_test.go')
-rw-r--r--static_pool_test.go5
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") },