Skip to content

Commit f521f6d

Browse files
authored
[None][fix] Fix unterminated process issue for RemoteOpenAIServer (#9490)
Signed-off-by: Junyi Xu <[email protected]>
1 parent 4a3a66b commit f521f6d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/unittest/llmapi/apps/openai_server.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ def _wait_for_server(self, *, url: str, timeout: float):
9797

9898
time.sleep(0.5)
9999
if time.time() - start > timeout:
100+
# Terminate the server to avoid the process keeping running in background after timeout
101+
self.terminate()
100102
raise RuntimeError(
101103
"Server failed to start in time.") from err
102104

0 commit comments

Comments
 (0)