From 7d655911ab70fffa88716e773ca38f6b1a43d152 Mon Sep 17 00:00:00 2001 From: xmdhs Date: Thu, 12 Oct 2023 21:30:17 +0800 Subject: [PATCH] fix --- test/server_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/server_test.go b/test/server_test.go index 5a7fec3..4c965e3 100644 --- a/test/server_test.go +++ b/test/server_test.go @@ -18,5 +18,9 @@ func TestMain(m *testing.M) { lo.Must0(toml.Unmarshal(b, &config)) s, cancel := lo.Must2(server.InitializeRoute(ctx, config)) defer cancel() - s.ListenAndServe() + go func() { + s.ListenAndServe() + }() + + os.Exit(m.Run()) }