mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 05:16:35 +08:00
Sleep for one millisecond in the handler because the Latency
will return 0s
sometimes and the test will fail
This commit is contained in:
parent
865fd560fc
commit
10cbf7a42d
@ -208,6 +208,7 @@ func TestLoggerWithConfigFormatting(t *testing.T) {
|
||||
// set dummy ClientIP
|
||||
c.Request.Header.Set("X-Forwarded-For", "20.20.20.20")
|
||||
gotKeys = c.Keys
|
||||
time.Sleep(time.Millisecond)
|
||||
})
|
||||
PerformRequest(router, "GET", "/example?a=100")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user