From 31180a6a132c8ca9d4b46c16b493a55e49cfaf0c Mon Sep 17 00:00:00 2001 From: xiaolei373 Date: Tue, 28 Oct 2025 10:38:06 +0800 Subject: [PATCH] fix_run_batch_unittest (#4613) --- tests/entrypoints/openai/test_run_batch.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/entrypoints/openai/test_run_batch.py b/tests/entrypoints/openai/test_run_batch.py index 2e35c12bd..fc6803452 100644 --- a/tests/entrypoints/openai/test_run_batch.py +++ b/tests/entrypoints/openai/test_run_batch.py @@ -1249,6 +1249,10 @@ class TestBatchProgressTrackerExtended(unittest.TestCase): mock_logger.info.assert_called_with(f"Progress: {i}/100 requests completed") +FD_ENGINE_QUEUE_PORT = int(os.getenv("FD_ENGINE_QUEUE_PORT", 8133)) +FD_CACHE_QUEUE_PORT = int(os.getenv("FD_CACHE_QUEUE_PORT", 8333)) + + class TestFastDeployBatch(unittest.TestCase): """测试 FastDeploy 批处理功能的 unittest 测试类""" @@ -1261,7 +1265,7 @@ class TestFastDeployBatch(unittest.TestCase): def run_fastdeploy_command(self, input_content, port=None): """运行 FastDeploy 命令的辅助方法""" if port is None: - port = "1231" + port = str(FD_CACHE_QUEUE_PORT) with tempfile.NamedTemporaryFile("w") as input_file, tempfile.NamedTemporaryFile("r") as output_file: @@ -1288,7 +1292,7 @@ class TestFastDeployBatch(unittest.TestCase): "--load-choices", "default_v1", "--engine-worker-queue-port", - "3672", + str(FD_ENGINE_QUEUE_PORT), ] # command = self.base_command + param