test: drain proxy before native shutdown

This commit is contained in:
2026-09-22 16:07:37 +08:00
parent fadd17a4d4
commit a4d843b8f4

View File

@@ -240,6 +240,12 @@ def main() -> None:
time.sleep(2.2) time.sleep(2.2)
print("PASS Nginx TLS proxy, Keep-Alive and upstream timeout", flush=True) print("PASS Nginx TLS proxy, Keep-Alive and upstream timeout", flush=True)
# Drain the edge proxy before stopping its upstream, matching a
# rolling deployment where traffic is removed from the old task
# before its listener is shut down.
nginx.terminate()
nginx.wait(timeout=5)
assert backend.stdin is not None assert backend.stdin is not None
backend.stdin.write('"stop"\n') backend.stdin.write('"stop"\n')
backend.stdin.flush() backend.stdin.flush()