We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82b703f commit 3d66da1Copy full SHA for 3d66da1
1 file changed
tools/server/tests/utils.py
@@ -288,7 +288,15 @@ def stop(self) -> None:
288
server_instances.remove(self)
289
if self.process:
290
print(f"Stopping server with pid={self.process.pid}")
291
- self.process.kill()
+ self.process.terminate()
292
+ try:
293
+ self.process.wait(timeout=5)
294
+ except subprocess.TimeoutExpired:
295
+ print(f"Server pid={self.process.pid} did not terminate in time, killing")
296
+ self.process.kill()
297
298
+ except Exception as e:
299
+ print(f"Error waiting for server: {e}")
300
self.process = None
301
302
def make_request(
0 commit comments