From 443c633aab57e33094781bb33c52f7dae63ab267 Mon Sep 17 00:00:00 2001 From: Cecylia Bocovich Date: Tue, 24 Sep 2024 13:12:23 -0400 Subject: [PATCH] Revert "Move time.Sleep call in turbotunnel test" This reverts commit 4497d68d6fd3130dee71b0208fa1e67829ad6717. --- common/turbotunnel/queuepacketconn_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/common/turbotunnel/queuepacketconn_test.go b/common/turbotunnel/queuepacketconn_test.go index 2934971..30e69e3 100644 --- a/common/turbotunnel/queuepacketconn_test.go +++ b/common/turbotunnel/queuepacketconn_test.go @@ -208,16 +208,14 @@ func TestQueuePacketConnWriteToKCP(t *testing.T) { panic(err) } - // A sleep after the Write makes buffer reuse more likely, and is needed - // to allow time for flushing all bytes written to the connection before close. - // This is not guaranteed by kcp-go. See https://github.com/xtaci/kcp-go/issues/273 - time.Sleep(100 * 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 len(transcript.Transcript) == 0 { panic("empty transcript") }