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:
parent
9743380e2d
commit
50e77cbb19
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user