From f47a1b1d0f76f3d7ef72105854c19ba4a6502a70 Mon Sep 17 00:00:00 2001 From: Lianmin Zheng Date: Fri, 13 Jun 2025 23:12:14 -0700 Subject: [PATCH] Increase timeout in test/srt/test_disaggregation.py (#7175) --- python/sglang/test/test_utils.py | 2 +- test/srt/test_disaggregation.py | 22 +++------------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/python/sglang/test/test_utils.py b/python/sglang/test/test_utils.py index 8e33fd8f9..c83a3ed1e 100644 --- a/python/sglang/test/test_utils.py +++ b/python/sglang/test/test_utils.py @@ -85,7 +85,7 @@ DEFAULT_SMALL_VLM_MODEL_NAME_FOR_TEST = "Qwen/Qwen2.5-VL-3B-Instruct" DEFAULT_IMAGE_URL = "https://github.com/sgl-project/sglang/blob/main/test/lang/example_image.png?raw=true" DEFAULT_VIDEO_URL = "https://raw.githubusercontent.com/EvolvingLMMs-Lab/sglang/dev/onevision_local/assets/jobs.mp4" -DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH = 1000 +DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH = 600 def is_in_ci(): diff --git a/test/srt/test_disaggregation.py b/test/srt/test_disaggregation.py index 757c33b8f..a4a85eb36 100644 --- a/test/srt/test_disaggregation.py +++ b/test/srt/test_disaggregation.py @@ -103,7 +103,7 @@ class TestDisaggregationAccuracy(CustomTestCase): ) @classmethod - def wait_server_ready(cls, url, timeout=60): + def wait_server_ready(cls, url, timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH): start_time = time.perf_counter() while True: try: @@ -284,7 +284,7 @@ class TestDisaggregationMooncakeFailure(CustomTestCase): ) @classmethod - def wait_server_ready(cls, url, timeout=60): + def wait_server_ready(cls, url, timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH): start_time = time.perf_counter() while True: try: @@ -388,7 +388,7 @@ class TestDisaggregationMooncakeSpec(CustomTestCase): cls.wait_server_ready(cls.lb_url + "/health") @classmethod - def wait_server_ready(cls, url, timeout=60): + def wait_server_ready(cls, url, timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH): start_time = time.perf_counter() while True: try: @@ -441,22 +441,6 @@ class TestDisaggregationMooncakeSpec(CustomTestCase): other_args=decode_args, ) - @classmethod - def wait_server_ready(cls, url, timeout=60): - start_time = time.perf_counter() - while True: - try: - response = requests.get(url) - if response.status_code == 200: - print(f"Server {url} is ready") - return - except Exception: - pass - - if time.perf_counter() - start_time > timeout: - raise RuntimeError(f"Server {url} failed to start in {timeout}s") - time.sleep(1) - @classmethod def tearDownClass(cls): for process in [cls.process_lb, cls.process_decode, cls.process_prefill]: