mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Move and increase sleep time in queuepacketconn test
This should give written data enough time to make it to the post processing queue before the connection is closed. See https://github.com/xtaci/kcp-go/issues/273
This commit is contained in:
parent
b9e7865c50
commit
452a6d22b1
1 changed files with 4 additions and 3 deletions
|
@ -215,14 +215,15 @@ func TestQueuePacketConnWriteToKCP(t *testing.T) {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
// A sleep after the Write makes buffer reuse more likely,
|
||||
// and to allow the connection to flush before close
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
|
||||
err = conn.Close()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// A sleep after the Write makes buffer reuse more likely.
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
if transcript.Length() == 0 {
|
||||
panic("empty transcript")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue