Simplify stream_output (#2398)

This commit is contained in:
Lianmin Zheng
2024-12-08 12:27:13 -08:00
committed by GitHub
parent f62055b528
commit a6ca736c8e
9 changed files with 426 additions and 290 deletions

View File

@@ -720,13 +720,13 @@ def run_and_check_memory_leak(
# Clean up everything
kill_process_tree(process.pid)
kill_process_tree(process.pid)
stdout.close()
stderr.close()
if os.path.exists(STDOUT_FILENAME):
os.remove(STDOUT_FILENAME)
if os.path.exists(STDERR_FILENAME):
os.remove(STDERR_FILENAME)
kill_process_tree(process.pid)
t.join()
# Assert success
@@ -734,7 +734,7 @@ def run_and_check_memory_leak(
has_leak = False
has_abort = False
for line in output_lines:
if "The server is fired" in line:
if "Uvicorn running" in line:
has_new_server = True
if "leak" in line:
has_leak = True