From 50e77cbb19bf7ec0c58b04e9440309a12e043ca3 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Thu, 6 Dec 2018 14:44:24 +0100 Subject: [PATCH] fix broken test --- transport/pipe/pipe_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transport/pipe/pipe_test.go b/transport/pipe/pipe_test.go index f49c476a..54c854ed 100644 --- a/transport/pipe/pipe_test.go +++ b/transport/pipe/pipe_test.go @@ -1,6 +1,7 @@ package pipe_test import ( + "context" "io" "sync" "testing" @@ -73,7 +74,7 @@ func TestPipeLimitZero(t *testing.T) { bb.Write([]byte{'a', 'b'}) assert(pWriter.WriteMultiBuffer(buf.MultiBuffer{bb}), IsNil) - err := task.Run(task.Parallel(func() error { + err := task.Run(context.Background(), func() error { b := buf.New() b.Write([]byte{'c', 'd'}) return pWriter.WriteMultiBuffer(buf.MultiBuffer{b}) @@ -91,7 +92,7 @@ func TestPipeLimitZero(t *testing.T) { time.Sleep(time.Second * 2) pWriter.Close() return nil - }))() + }) assert(err, IsNil) }