From 8cf38342e9f77d7e38af7d31fb0e7aa7aacadd9c Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Fri, 7 Jun 2019 12:05:06 +0800 Subject: [PATCH] Delay Closing Connection so that test have chance to complete(Additional) --- testing/scenarios/vmess_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testing/scenarios/vmess_test.go b/testing/scenarios/vmess_test.go index 94e1c7b26..cb544337b 100644 --- a/testing/scenarios/vmess_test.go +++ b/testing/scenarios/vmess_test.go @@ -1165,7 +1165,6 @@ func TestVMessGCMMuxUDP(t *testing.T) { servers, err := InitializeServerConfigs(serverConfig, clientConfig) common.Must(err) - defer CloseAllServers(servers) for range "abcd" { var errg errgroup.Group @@ -1178,4 +1177,9 @@ func TestVMessGCMMuxUDP(t *testing.T) { } time.Sleep(time.Second) } + + defer func(){ + <-time.After(5*time.Second) + CloseAllServers(servers) + }() }