From 2ce11a20c40eeffb421f65fabeee4c01629f4932 Mon Sep 17 00:00:00 2001 From: cthuang Date: Thu, 21 Oct 2021 15:48:11 +0100 Subject: [PATCH] TUN-5287: Fix misuse of wait group in TestQUICServer that caused the test to exit immediately --- connection/quic_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connection/quic_test.go b/connection/quic_test.go index 40b7eaf4..fc551a4b 100644 --- a/connection/quic_test.go +++ b/connection/quic_test.go @@ -154,8 +154,8 @@ func TestQUICServer(t *testing.T) { t.Run(test.desc, func(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) var wg sync.WaitGroup + wg.Add(1) go func() { - wg.Add(1) defer wg.Done() quicServer( t, udpListener, tlsConfig, quicConfig,