[CI] Graceful teardown for kv_canary and EAGLE spec fixtures (#32829)
This commit is contained in:
+4
-15
@@ -1,12 +1,10 @@
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
from test_unified_radix_cache_kl_nightly import AccuracyTwoPassMixin
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ci.ci_register import register_cuda_ci
|
||||
from sglang.test.kits.unified_radix_cache_kit import UnifiedRadixTreeTestMixin
|
||||
from sglang.test.kl_multiturn_utils import (
|
||||
@@ -19,6 +17,7 @@ from sglang.test.test_utils import (
|
||||
DEFAULT_URL_FOR_TEST,
|
||||
CustomTestCase,
|
||||
popen_launch_server,
|
||||
terminate_and_kill_process_tree,
|
||||
)
|
||||
|
||||
register_cuda_ci(est_time=800, stage="extra-b", runner_config="4-gpu-h100")
|
||||
@@ -69,7 +68,7 @@ class TestUnifiedMambaRadixCache(UnifiedRadixTreeTestMixin, CustomTestCase):
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
kill_process_tree(cls.process.pid)
|
||||
terminate_and_kill_process_tree(cls.process, wait_timeout=60)
|
||||
|
||||
|
||||
# ─── Mamba + HiCache L2 ──────────────────────────────────────────────────────
|
||||
@@ -128,12 +127,7 @@ 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)
|
||||
terminate_and_kill_process_tree(cls.process, wait_timeout=60)
|
||||
|
||||
|
||||
# ─── Mamba + HiCache L3 (file backend) ───────────────────────────────────────
|
||||
@@ -194,12 +188,7 @@ 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)
|
||||
terminate_and_kill_process_tree(cls.process, wait_timeout=60)
|
||||
if os.path.isdir(cls.hicache_dir):
|
||||
shutil.rmtree(cls.hicache_dir, ignore_errors=True)
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ from sglang.test.vlm_utils import (
|
||||
OmniOpenAITestMixin,
|
||||
TestOpenAIMLLMServerBase,
|
||||
VideoOpenAITestMixin,
|
||||
terminate_and_kill_process_tree,
|
||||
)
|
||||
|
||||
register_cuda_ci(est_time=780, stage="base-b", runner_config="1-gpu-large")
|
||||
@@ -74,7 +75,7 @@ class TestQwen2VLContextLengthServer(CustomTestCase):
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
kill_process_tree(cls.process.pid)
|
||||
terminate_and_kill_process_tree(cls.process, wait_timeout=60)
|
||||
|
||||
def test_single_image_chat_completion(self):
|
||||
client = openai.Client(api_key=self.api_key, base_url=self.base_url)
|
||||
|
||||
@@ -29,8 +29,8 @@ from sglang.srt.utils.common import is_xpu
|
||||
from sglang.test.test_utils import CustomTestCase
|
||||
from sglang.test.vlm_utils import (
|
||||
DEFAULT_URL_FOR_TEST,
|
||||
kill_process_tree,
|
||||
popen_launch_server,
|
||||
terminate_and_kill_process_tree,
|
||||
)
|
||||
|
||||
MODEL = "google/gemma-4-E2B-it"
|
||||
@@ -98,7 +98,7 @@ class TestGemma4E2BXPU(CustomTestCase):
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
kill_process_tree(cls.process.pid)
|
||||
terminate_and_kill_process_tree(cls.process, wait_timeout=60)
|
||||
_empty_xpu_cache()
|
||||
|
||||
def test_simple_qa(self):
|
||||
|
||||
Reference in New Issue
Block a user