SIGN IN SIGN UP
gin-gonic / gin UNCLAIMED

Gin is a high-performance HTTP web framework written in Go. It provides a Martini-like API but with significantly better performance—up to 40 times faster—thanks to httprouter. Gin is designed for building REST APIs, web applications, and microservices.

test(gin): resolve race conditions in integration tests (#4453)

- Implement TestRebuild404Handlers to verify 404 handler chain rebuilding
  when global middleware is added via Use()
- Add waitForServerReady helper with exponential backoff to replace
  unreliable time.Sleep() calls in integration tests
- Fix race conditions in TestRunEmpty, TestRunEmptyWithEnv, and
  TestRunWithPort by using proper server readiness checks
- All tests now pass consistently with -race flag

This addresses the empty test function and eliminates flaky test failures
caused by insufficient wait times for server startup.

Co-authored-by: Bo-Yi Wu <[email protected]>
W
Wayne Aki committed
f416d1e594a027063e73f66ac873a82113036fd8
Parent: 583db59
Committed by GitHub <[email protected]> on 11/30/2025, 7:38:07 AM