From 60903ec1f779d1e6856523d96de2f91c41cd4b50 Mon Sep 17 00:00:00 2001 From: changukyu Date: Sat, 8 Aug 2026 09:49:55 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=EC=97=85=EB=A1=9C=EB=93=9C=20E2E=20?= =?UTF-8?q?=ED=94=8C=EB=A0=88=EC=9D=B4=ED=81=AC=20=ED=95=B4=EC=86=8C=20(?= =?UTF-8?q?=EB=8C=80=EA=B8=B0=2010=EC=B4=88=20->=2030=EC=B4=88=20=EC=83=81?= =?UTF-8?q?=EC=88=98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_browser_uploads_image_and_selects_new_submission 이 전체 스위트에서만 실패하고 단독 실행에서는 통과했다. 업로드는 케이스가 큐에 나타나기 전에 서버에서 실분석(디코드/지문/YuNet)을 돌리므로, 다른 스펙과 CPU 를 다투는 전체 실행에서 10초를 넘겼다. UPLOAD_ANALYSIS_TIMEOUT_MS(30초)로 올리고 이유를 상수 옆에 남겼다. 모킹된 부트스트랩 대기와 달리 이 경로만 여유가 필요하다는 점이 코드에서 보이게 했다. upload_and_open 의 기본값도 같은 상수를 쓴다. --- tests/operator_gui/pages/workbench_page.py | 10 +++++++++- tests/operator_gui/test_browser_smoke.py | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/operator_gui/pages/workbench_page.py b/tests/operator_gui/pages/workbench_page.py index 4fc5f48..f049a25 100644 --- a/tests/operator_gui/pages/workbench_page.py +++ b/tests/operator_gui/pages/workbench_page.py @@ -20,6 +20,12 @@ SUGGESTED_QUERY_LOADED_STATUS = "추천 쿼리를 입력했습니다. 실행 버 # Client-side guard message when a reject/correct decision is missing its memo. MEMO_REQUIRED_ERROR = "반려 또는 보정 결정에는 메모가 필요합니다." +# Uploading runs the real analysis pipeline server-side (decode, fingerprints, +# YuNet face detection) before the case appears in the queue, so this path needs +# far more headroom than a mocked-bootstrap wait. At 10s it passed standalone but +# failed inside the full suite, where the other specs contend for the same CPU. +UPLOAD_ANALYSIS_TIMEOUT_MS = 30000 + class OperatorWorkbench: """Drives the operator GUI for browser-level (E2E) assertions.""" @@ -123,7 +129,9 @@ class OperatorWorkbench: self.page.get_by_role("button", name="사진 넣기").click() return self - def upload_and_open(self, file_path: str, case_id: str, timeout: int = 10000) -> "OperatorWorkbench": + def upload_and_open( + self, file_path: str, case_id: str, timeout: int = UPLOAD_ANALYSIS_TIMEOUT_MS + ) -> "OperatorWorkbench": """Upload an image and wait until its new case is queued and the workbench opens.""" self.upload_submission(file_path) self.confirm_upload() diff --git a/tests/operator_gui/test_browser_smoke.py b/tests/operator_gui/test_browser_smoke.py index e74ddc4..d232f10 100644 --- a/tests/operator_gui/test_browser_smoke.py +++ b/tests/operator_gui/test_browser_smoke.py @@ -3,7 +3,7 @@ from __future__ import annotations import pytest from .pages import OperatorWorkbench -from .pages.workbench_page import SUGGESTED_QUERY_LOADED_STATUS +from .pages.workbench_page import SUGGESTED_QUERY_LOADED_STATUS, UPLOAD_ANALYSIS_TIMEOUT_MS def _bootstrap_payload(): @@ -104,8 +104,8 @@ def test_browser_uploads_image_and_selects_new_submission(operator_server, opera assert workbench.submission_image_name.inner_text() == "smoke upload.svg" workbench.confirm_upload() - workbench.wait_for_case("smoke-upload", state="attached", timeout=10000) - workbench.workbench_view.wait_for(state="visible", timeout=10000) + workbench.wait_for_case("smoke-upload", state="attached", timeout=UPLOAD_ANALYSIS_TIMEOUT_MS) + workbench.workbench_view.wait_for(state="visible", timeout=UPLOAD_ANALYSIS_TIMEOUT_MS) assert (operator_server.image_root / "images" / "smoke-upload.svg").exists() assert (