Skip to content

Commit fd60a24

Browse files
authored
test(path): Optimize unit test execution results (#3883)
* test(path): Add a GC recycle validation * test(path): Optimize unit test execution results * test(path): Optimize unit test execution results
1 parent ee70b30 commit fd60a24

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

path_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
package gin
77

88
import (
9+
"runtime"
910
"strings"
1011
"testing"
1112

@@ -80,6 +81,10 @@ func TestPathCleanMallocs(t *testing.T) {
8081
t.Skip("skipping malloc count in short mode")
8182
}
8283

84+
if runtime.GOMAXPROCS(0) > 1 {
85+
t.Skip("skipping malloc count; GOMAXPROCS>1")
86+
}
87+
8388
for _, test := range cleanTests {
8489
allocs := testing.AllocsPerRun(100, func() { cleanPath(test.result) })
8590
assert.EqualValues(t, allocs, 0)

0 commit comments

Comments
 (0)