mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-15 13:02:14 +08:00
test(path): Optimize unit test execution results
This commit is contained in:
parent
baf4c15e41
commit
37a3a17959
@ -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) })
|
||||
|
Loading…
x
Reference in New Issue
Block a user