From 696e8f80d1cec93b3a020e00b5ff2ae2aa969f21 Mon Sep 17 00:00:00 2001 From: Alison Shao <54658187+alisonshao@users.noreply.github.com> Date: Tue, 21 Jul 2026 02:09:26 -0700 Subject: [PATCH] [CI] Graceful teardown in kl_mamba hicache tests to release pinned host pool (#31871) --- .../test_unified_radix_cache_kl_mamba.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_mamba.py b/test/registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_mamba.py index a46a7f2ca..e1f150b65 100644 --- a/test/registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_mamba.py +++ b/test/registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_mamba.py @@ -1,5 +1,6 @@ import os import shutil +import subprocess import tempfile import unittest @@ -125,6 +126,11 @@ class TestUnifiedMambaHiCache(UnifiedRadixTreeTestMixin, CustomTestCase): @classmethod def tearDownClass(cls): + cls.process.terminate() + try: + cls.process.wait(timeout=60) + except subprocess.TimeoutExpired: + pass kill_process_tree(cls.process.pid) @@ -186,6 +192,11 @@ class TestUnifiedMambaHiCacheL3(AccuracyTwoPassMixin, CustomTestCase): @classmethod def tearDownClass(cls): + cls.process.terminate() + try: + cls.process.wait(timeout=60) + except subprocess.TimeoutExpired: + pass kill_process_tree(cls.process.pid) if os.path.isdir(cls.hicache_dir): shutil.rmtree(cls.hicache_dir, ignore_errors=True)