From 46206991fb841d13f4554b3269236c31d08bc78c Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 3 Feb 2021 23:59:38 +0300 Subject: Increase channel cap for the tests --- pkg/transport/pipe/pipe_factory_spawn_test.go | 2 +- pkg/transport/pipe/pipe_factory_test.go | 2 +- pkg/transport/socket/socket_factory_spawn_test.go | 8 ++++---- pkg/transport/socket/socket_factory_test.go | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'pkg/transport') diff --git a/pkg/transport/pipe/pipe_factory_spawn_test.go b/pkg/transport/pipe/pipe_factory_spawn_test.go index 663b3dd5..73008471 100644 --- a/pkg/transport/pipe/pipe_factory_spawn_test.go +++ b/pkg/transport/pipe/pipe_factory_spawn_test.go @@ -106,7 +106,7 @@ func Test_Pipe_PipeError4(t *testing.T) { func Test_Pipe_Failboot2(t *testing.T) { cmd := exec.Command("php", "../../../tests/failboot.php") - finish := make(chan struct{}, 1) + finish := make(chan struct{}, 10) listener := func(event interface{}) { if ev, ok := event.(events.WorkerEvent); ok { if ev.Event == events.EventWorkerStderr { diff --git a/pkg/transport/pipe/pipe_factory_test.go b/pkg/transport/pipe/pipe_factory_test.go index 6045dd91..3efeb59c 100755 --- a/pkg/transport/pipe/pipe_factory_test.go +++ b/pkg/transport/pipe/pipe_factory_test.go @@ -118,7 +118,7 @@ func Test_Pipe_Failboot(t *testing.T) { cmd := exec.Command("php", "../../../tests/failboot.php") ctx := context.Background() - finish := make(chan struct{}, 1) + finish := make(chan struct{}, 10) listener := func(event interface{}) { if ev, ok := event.(events.WorkerEvent); ok { if ev.Event == events.EventWorkerStderr { diff --git a/pkg/transport/socket/socket_factory_spawn_test.go b/pkg/transport/socket/socket_factory_spawn_test.go index 50729546..1361693b 100644 --- a/pkg/transport/socket/socket_factory_spawn_test.go +++ b/pkg/transport/socket/socket_factory_spawn_test.go @@ -110,7 +110,7 @@ func Test_Tcp_Failboot2(t *testing.T) { cmd := exec.Command("php", "../../../tests/failboot.php") - finish := make(chan struct{}, 1) + finish := make(chan struct{}, 10) listener := func(event interface{}) { if ev, ok := event.(events.WorkerEvent); ok { if ev.Event == events.EventWorkerStderr { @@ -162,7 +162,7 @@ func Test_Tcp_Broken2(t *testing.T) { cmd := exec.Command("php", "../../../tests/client.php", "broken", "tcp") - finish := make(chan struct{}, 1) + finish := make(chan struct{}, 10) listener := func(event interface{}) { if ev, ok := event.(events.WorkerEvent); ok { if ev.Event == events.EventWorkerStderr { @@ -274,7 +274,7 @@ func Test_Unix_Failboot2(t *testing.T) { cmd := exec.Command("php", "../../../tests/failboot.php") - finish := make(chan struct{}, 1) + finish := make(chan struct{}, 10) listener := func(event interface{}) { if ev, ok := event.(events.WorkerEvent); ok { if ev.Event == events.EventWorkerStderr { @@ -332,7 +332,7 @@ func Test_Unix_Broken2(t *testing.T) { cmd := exec.Command("php", "../../../tests/client.php", "broken", "unix") - finish := make(chan struct{}, 1) + finish := make(chan struct{}, 10) listener := func(event interface{}) { if ev, ok := event.(events.WorkerEvent); ok { if ev.Event == events.EventWorkerStderr { diff --git a/pkg/transport/socket/socket_factory_test.go b/pkg/transport/socket/socket_factory_test.go index 4abcd5d9..c13a897b 100755 --- a/pkg/transport/socket/socket_factory_test.go +++ b/pkg/transport/socket/socket_factory_test.go @@ -120,7 +120,7 @@ func Test_Tcp_Failboot(t *testing.T) { cmd := exec.Command("php", "../../../tests/failboot.php") - finish := make(chan struct{}, 1) + finish := make(chan struct{}, 10) listener := func(event interface{}) { if ev, ok := event.(events.WorkerEvent); ok { if ev.Event == events.EventWorkerStderr { @@ -199,7 +199,7 @@ func Test_Tcp_Broken(t *testing.T) { cmd := exec.Command("php", "../../../tests/client.php", "broken", "tcp") - finish := make(chan struct{}, 1) + finish := make(chan struct{}, 10) listener := func(event interface{}) { if ev, ok := event.(events.WorkerEvent); ok { if ev.Event == events.EventWorkerStderr { @@ -325,7 +325,7 @@ func Test_Unix_Failboot(t *testing.T) { cmd := exec.Command("php", "../../../tests/failboot.php") - finish := make(chan struct{}, 1) + finish := make(chan struct{}, 10) listener := func(event interface{}) { if ev, ok := event.(events.WorkerEvent); ok { if ev.Event == events.EventWorkerStderr { -- cgit v1.2.3