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:
parent
afc613f8f3
commit
8d8eb0f35a
@ -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
|
||||
}))()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user