mirror of
https://github.com/distribution/distribution.git
synced 2026-01-14 20:36:29 +00:00
The `TestGracefulShutdown` test was failing intermittently, especially with stricter HTTP handling in newer Go versions (e.g., 1.25). This was caused by sending an incomplete HTTP request in two separate writes, creating a race condition where the server could shut down before receiving the full request. This commit fixes the test's flakiness by sending a single, complete, and valid HTTP/1.1 request before triggering the shutdown. This ensures the test accurately verifies the intended behavior: that a valid, in-flight request is fully processed while new connections are rejected. Fixes:#4696 Signed-off-by: Sumedh Vats <sumedhvats2004@gmail.com>