From e701e2a4b3e27f2a185dad086808a0aeedb483f3 Mon Sep 17 00:00:00 2001 From: xgfone Date: Mon, 13 May 2024 14:11:05 +0800 Subject: [PATCH] fix a test --- http/server/server_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/http/server/server_test.go b/http/server/server_test.go index 206415a..b7649d6 100644 --- a/http/server/server_test.go +++ b/http/server/server_test.go @@ -19,9 +19,13 @@ import ( "net/http" "testing" "time" + + "github.com/xgfone/go-defaults" ) func TestStartServer(t *testing.T) { + defaults.ExitFunc.Set(func(int) {}) + func() { start := time.Now() ctx, cancel := context.WithTimeout(context.Background(), time.Second)