From daf21b782d536c172fa16af4cb720c26ac06187f Mon Sep 17 00:00:00 2001 From: Wei Fu Date: Thu, 15 Dec 2022 18:16:59 +0800 Subject: [PATCH] e2e: deflake TestCtlV3AuthGracefulDisable We should call Wait for grpc-proxy process stop before start. Otherwise, the tcp port won't be released. Fixes: #14926 Signed-off-by: Wei Fu --- tests/framework/e2e/cluster_proxy.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/framework/e2e/cluster_proxy.go b/tests/framework/e2e/cluster_proxy.go index 4e387410b5d2..10f723bbe46b 100644 --- a/tests/framework/e2e/cluster_proxy.go +++ b/tests/framework/e2e/cluster_proxy.go @@ -159,7 +159,13 @@ func (pp *proxyProc) Stop() error { if pp.proc == nil { return nil } - if err := pp.proc.Stop(); err != nil && !strings.Contains(err.Error(), "exit status 1") { + err := pp.proc.Stop() + if err != nil { + return err + } + + err = pp.proc.Close() + if err != nil && !strings.Contains(err.Error(), "exit status 1") { // v2proxy exits with status 1 on auto tls; not sure why return err }