From a368be6c68c2837b81789530836ca66cde605ff2 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 27 Feb 2020 17:14:12 +0300 Subject: Fix test for Broken_PIPE --- socket_factory_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/socket_factory_test.go b/socket_factory_test.go index 8beb3fc6..b2bb3ef1 100644 --- a/socket_factory_test.go +++ b/socket_factory_test.go @@ -193,14 +193,16 @@ func Test_Tcp_Broken(t *testing.T) { }() defer func() { - err = w.Stop() - assert.Error(t, err) + time.Sleep(time.Second) + err2 := w.Stop() + assert.NoError(t, err2) }() res, err := w.Exec(&Payload{Body: []byte("hello")}) assert.Error(t, err) assert.Nil(t, res) + return } func Test_Tcp_Echo(t *testing.T) { -- cgit v1.2.3