fix: report proxy shutdown failures
This commit is contained in:
@@ -226,8 +226,12 @@ def main() -> None:
|
||||
assert backend.stdin is not None
|
||||
backend.stdin.write('"stop"\n')
|
||||
backend.stdin.flush()
|
||||
if backend.wait(timeout=5) != 0:
|
||||
raise AssertionError("native server did not shut down cleanly behind Nginx")
|
||||
exit_code = backend.wait(timeout=5)
|
||||
if exit_code != 0:
|
||||
details = backend.stderr.read().strip() if backend.stderr is not None else ""
|
||||
raise AssertionError(
|
||||
f"native server did not shut down cleanly behind Nginx: exit={exit_code} {details}"
|
||||
)
|
||||
print("PASS native graceful shutdown behind proxy", flush=True)
|
||||
finally:
|
||||
if nginx is not None and nginx.poll() is None:
|
||||
|
||||
Reference in New Issue
Block a user