1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-02 23:47:07 -05:00

update pipe test

This commit is contained in:
Darien Raymond 2018-11-19 16:29:27 +01:00
parent afc613f8f3
commit 8d8eb0f35a
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -76,17 +76,16 @@ func TestPipeLimitZero(t *testing.T) {
}, func() error {
time.Sleep(time.Second)
rb, err := pReader.ReadMultiBuffer()
if err != nil {
var container buf.MultiBufferContainer
if err := buf.Copy(pReader, &container); err != nil {
return err
}
assert(rb.String(), Equals, "ab")
rb, err = pReader.ReadMultiBuffer()
if err != nil {
return err
}
assert(rb.String(), Equals, "cd")
assert(container.String(), Equals, "abcd")
return nil
}, func() error {
time.Sleep(time.Second * 2)
pWriter.Close()
return nil
}))()