1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 17:46:58 -05:00

fix broken test

This commit is contained in:
Darien Raymond 2018-12-06 14:44:24 +01:00
parent 9743380e2d
commit 50e77cbb19
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -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)
}