From bcb39a19b9ac879953004ed54de71c0c1d903d63 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 27 Feb 2020 18:05:39 +0300 Subject: Fix test_pipe_broken --- pipe_factory_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pipe_factory_test.go') diff --git a/pipe_factory_test.go b/pipe_factory_test.go index 27d1f74d..14cf1272 100644 --- a/pipe_factory_test.go +++ b/pipe_factory_test.go @@ -4,6 +4,7 @@ import ( "github.com/stretchr/testify/assert" "os/exec" "testing" + "time" ) func Test_Pipe_Start(t *testing.T) { @@ -108,8 +109,9 @@ func Test_Pipe_Broken(t *testing.T) { assert.Contains(t, err.Error(), "undefined_function()") }() defer func() { + time.Sleep(time.Second) err := w.Stop() - assert.Error(t, err) + assert.NoError(t, err) }() res, err := w.Exec(&Payload{Body: []byte("hello")}) -- cgit v1.2.3