Unverified Commit f47a1b1d authored by Lianmin Zheng's avatar Lianmin Zheng Committed by GitHub
Browse files

Increase timeout in test/srt/test_disaggregation.py (#7175)

parent 93cec433
...@@ -85,7 +85,7 @@ DEFAULT_SMALL_VLM_MODEL_NAME_FOR_TEST = "Qwen/Qwen2.5-VL-3B-Instruct" ...@@ -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_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_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(): def is_in_ci():
......
...@@ -103,7 +103,7 @@ class TestDisaggregationAccuracy(CustomTestCase): ...@@ -103,7 +103,7 @@ class TestDisaggregationAccuracy(CustomTestCase):
) )
@classmethod @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() start_time = time.perf_counter()
while True: while True:
try: try:
...@@ -284,7 +284,7 @@ class TestDisaggregationMooncakeFailure(CustomTestCase): ...@@ -284,7 +284,7 @@ class TestDisaggregationMooncakeFailure(CustomTestCase):
) )
@classmethod @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() start_time = time.perf_counter()
while True: while True:
try: try:
...@@ -388,7 +388,7 @@ class TestDisaggregationMooncakeSpec(CustomTestCase): ...@@ -388,7 +388,7 @@ class TestDisaggregationMooncakeSpec(CustomTestCase):
cls.wait_server_ready(cls.lb_url + "/health") cls.wait_server_ready(cls.lb_url + "/health")
@classmethod @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() start_time = time.perf_counter()
while True: while True:
try: try:
...@@ -441,22 +441,6 @@ class TestDisaggregationMooncakeSpec(CustomTestCase): ...@@ -441,22 +441,6 @@ class TestDisaggregationMooncakeSpec(CustomTestCase):
other_args=decode_args, 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 @classmethod
def tearDownClass(cls): def tearDownClass(cls):
for process in [cls.process_lb, cls.process_decode, cls.process_prefill]: for process in [cls.process_lb, cls.process_decode, cls.process_prefill]:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment