From 8c2a2e5becc054969c9cb8f4e7f24c8caa1564b9 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Fri, 9 Oct 2026 15:39:19 +0200 Subject: [PATCH] remote_cache: Kill SeaweedFS instead of stopping it weed keeps running for more than a minute after SIGTERM, because its filer retries a metadata write that fails once the volume server has stopped. close() waits 30 seconds for weed to exit and then kills weed. Each of the two test classes that start a server spends half a minute in that wait. Kill weed right away. Every caller removes the server's directory afterwards. Signed-off-by: Daan De Meyer --- remote_cache/seaweed.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/remote_cache/seaweed.py b/remote_cache/seaweed.py index d1263ffc..2704c6ca 100644 --- a/remote_cache/seaweed.py +++ b/remote_cache/seaweed.py @@ -108,12 +108,9 @@ def wait_for(self, url: str, first: Callable[[], None] | None = None) -> None: raise AssertionError(f"{url} never answered; see {self.log}") def close(self) -> None: - self.process.terminate() - try: - self.process.wait(timeout=30) - except subprocess.TimeoutExpired: - # A graceful stop flushes its volumes first, which a loaded machine can stretch past - # any patience; nothing in the temporary directory is worth waiting for. - self.process.kill() - self.process.wait() + # weed keeps running for more than a minute after SIGTERM, because its filer retries a + # metadata write that fails once the volume server has stopped. The caller removes the + # directory afterwards, so nothing in it needs a graceful stop. + self.process.kill() + self.process.wait() self.output.close()