From dd8e957f59cefdd3def143bd40a9a3480a29e93a Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Fri, 7 Jun 2019 10:01:23 +0800 Subject: [PATCH] Delay Closing Connection so that test have chance to complete --- 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 413da2e8a..94e1c7b26 100644 --- a/testing/scenarios/vmess_test.go +++ b/testing/scenarios/vmess_test.go @@ -919,7 +919,6 @@ func TestVMessKCPLarge(t *testing.T) { servers, err := InitializeServerConfigs(serverConfig, clientConfig) common.Must(err) - defer CloseAllServers(servers) var errg errgroup.Group for i := 0; i < 2; i++ { @@ -928,6 +927,11 @@ func TestVMessKCPLarge(t *testing.T) { if err := errg.Wait(); err != nil { t.Error(err) } + + defer func(){ + <-time.After(5*time.Second) + CloseAllServers(servers) + }() } func TestVMessGCMMux(t *testing.T) {