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