test(service): stabilize race checks for gin-based tests

This commit is contained in:
Your Name
2026-05-21 12:16:57 +08:00
parent 6e66edbb09
commit 70ca4eb72c
34 changed files with 19 additions and 300 deletions

View File

@@ -30,7 +30,6 @@ func TestSafeUpstreamURL(t *testing.T) {
}
func TestAppendOpsUpstreamError_UsesRequestBodyBytesFromContext(t *testing.T) {
gin.SetMode(gin.TestMode)
rec := httptest.NewRecorder()
c, _ := gin.CreateTestContext(rec)
@@ -49,7 +48,6 @@ func TestAppendOpsUpstreamError_UsesRequestBodyBytesFromContext(t *testing.T) {
}
func TestAppendOpsUpstreamError_UsesRequestBodyStringFromContext(t *testing.T) {
gin.SetMode(gin.TestMode)
rec := httptest.NewRecorder()
c, _ := gin.CreateTestContext(rec)