We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a73fdd commit 0e5533fCopy full SHA for 0e5533f
src/crate/testing/layer.py
@@ -326,12 +326,17 @@ def start(self):
326
327
def stop(self):
328
if self.process:
329
- self.process.terminate()
330
try:
331
self.process.communicate(timeout=10)
332
except subprocess.TimeoutExpired:
333
# On GHA/Windows, it always runs into a timeout, even after 45 seconds.
334
- pass
+ #
+ # The child process is not killed if the timeout expires, so in order
335
+ # to cleanup properly a well-behaved application should kill the child
336
+ # process and finish communication.
337
+ # https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate
338
+ self.process.kill()
339
+ self.process.communicate()
340
self.process.stdout.close()
341
self.process = None
342
self.conn_pool.clear()
0 commit comments