From 651c0491a9f15bfce2f61de60b303b7ed7d49735 Mon Sep 17 00:00:00 2001 From: Alexander Emelin Date: Mon, 16 Oct 2023 23:04:55 +0300 Subject: [PATCH] fix unstable proxy tests --- internal/tools/test_helpers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/tools/test_helpers.go b/internal/tools/test_helpers.go index eebe4587fe..84d9f5619d 100644 --- a/internal/tools/test_helpers.go +++ b/internal/tools/test_helpers.go @@ -2,6 +2,7 @@ package tools import ( "context" + "errors" "io" "log" "net/http" @@ -185,7 +186,7 @@ func NewCommonGRPCProxyTestCase(ctx context.Context, srv proxyproto.CentrifugoPr proxyproto.RegisterCentrifugoProxyServer(server, srv) go func() { - if err := server.Serve(listener); err != nil { + if err := server.Serve(listener); err != nil && !errors.Is(err, grpc.ErrServerStopped) { log.Fatalf("GRPC server exited with error: %v", err) } }()