From 37a3a17959fba5be7ef0250bc0a8987cf544eb6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Flc=E3=82=9B?= Date: Tue, 12 Mar 2024 14:27:15 +0800 Subject: [PATCH] test(path): Optimize unit test execution results --- path_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/path_test.go b/path_test.go index f7ba7566..659a4588 100644 --- a/path_test.go +++ b/path_test.go @@ -81,7 +81,10 @@ func TestPathCleanMallocs(t *testing.T) { t.Skip("skipping malloc count in short mode") } - runtime.GC() + if runtime.GOMAXPROCS(0) > 1 { + t.Skip("skipping malloc count; GOMAXPROCS>1") + return + } for _, test := range cleanTests { allocs := testing.AllocsPerRun(100, func() { cleanPath(test.result) })