summaryrefslogtreecommitdiff
path: root/transport/pipe/pipe_factory_test.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-10-27 22:42:07 +0300
committerValery Piashchynski <[email protected]>2021-10-27 22:42:07 +0300
commit52a6b1b2fc3eaf3cda5594825f3c5a9ae8a9452b (patch)
tree296d48dab1d5396313c061fbfc930a97af0df9f4 /transport/pipe/pipe_factory_test.go
parent15e6f474ef1340f4e93f213bab1cb9548e51a1e8 (diff)
Make sure events bus properly closed
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'transport/pipe/pipe_factory_test.go')
-rwxr-xr-xtransport/pipe/pipe_factory_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/transport/pipe/pipe_factory_test.go b/transport/pipe/pipe_factory_test.go
index 8c6d440a..0f527cd5 100755
--- a/transport/pipe/pipe_factory_test.go
+++ b/transport/pipe/pipe_factory_test.go
@@ -127,6 +127,7 @@ func Test_Pipe_Failboot(t *testing.T) {
ctx := context.Background()
eb, id := events.Bus()
+ defer eb.Unsubscribe(id)
ch := make(chan events.Event, 10)
err := eb.SubscribeP(id, "worker.EventWorkerStderr", ch)
require.NoError(t, err)
@@ -434,6 +435,7 @@ func Test_Broken(t *testing.T) {
cmd := exec.Command("php", "../../tests/client.php", "broken", "pipes")
eb, id := events.Bus()
+ defer eb.Unsubscribe(id)
ch := make(chan events.Event, 10)
err := eb.SubscribeP(id, "worker.EventWorkerStderr", ch)
require.NoError(t, err)