fix_run_batch_unittest (#4613)
Some checks failed
CE Compile Job / ce_job_pre_check (push) Has been cancelled
CE Compile Job / print_ce_job_pre_check_outputs (push) Has been cancelled
CE Compile Job / FD-Clone-Linux (push) Has been cancelled
CE Compile Job / Show Code Archive Output (push) Has been cancelled
CE Compile Job / BUILD_SM8090 (push) Has been cancelled
CE Compile Job / BUILD_SM8689 (push) Has been cancelled
CE Compile Job / CE_UPLOAD (push) Has been cancelled
Deploy GitHub Pages / deploy (push) Has been cancelled

This commit is contained in:
xiaolei373
2025-10-28 10:38:06 +08:00
committed by GitHub
parent 0b196d82f3
commit 31180a6a13

View File

@@ -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