Repository navigation
chore(frontend): e2e가 다른 작업 트리의 서버를 재사용하지 않게 수정 - #196
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Pull Request 요약e2e 테스트에서 서버 재사용과 포트 설정을 환경 변수 기반으로 관리하도록 목적을 변경했습니다. README.md에 재사용 및 포트 설정 사용법을 추가하고, playwright.config.ts와 포트 파싱 로직을 수정하여 환경 변수에 따라 서버를 재사용하거나 새로 시작하도록 구현했습니다.
복수 모델 · 입력 9,786 · 출력 1,781 · 합계 11,567 토큰 |
|
|
||
| const port = 4173; | ||
| // 여러 worktree에서 동시에 돌려도 서로의 서버를 쓰지 않도록 포트를 바꿀 수 있다(E2E_PORT). | ||
| const port = Number(process.env.E2E_PORT ?? 4173); |
There was a problem hiding this comment.
중요 포트 파싱 시 NaN 발생 가능
process.env.E2E_PORT가 숫자가 아닌 문자열일 경우 Number()는 NaN를 반환하고, ?? 연산자는 undefined만 처리하므로 NaN가 그대로 사용되어 서버 시작 시 포트 오류가 발생합니다.
제안:
const port = Number(process.env.E2E_PORT) || 4173;
복수 모델
Collaborator
Author
There was a problem hiding this comment.
7ab8f56에서 반영했습니다. 빈 값은 기본 4173을 쓰고, 숫자가 아니거나 범위를 벗어난 값은 기본 포트로 조용히 바꾸지 않고 설정 단계에서 오류를 냅니다. 잘못 적은 포트 때문에 엉뚱한 서버를 검사하는 일이 없게 하려는 것입니다.
로컬에서 4173 포트에 이미 떠 있는 서버를 재사용해, 다른 worktree의 빌드를 검사하는 일이 있었다. 기본은 항상 새로 빌드해 띄우고, E2E_PORT로 포트를 바꾸고 E2E_REUSE_SERVER=1일 때만 재사용한다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sunwoo162
force-pushed
the
sunwoo162/e2e-port-isolation
branch
from
November 28, 2026 16:18
827ad06 to
7ab8f56
Compare
sunwoo162
added a commit
that referenced
this pull request
Nov 29, 2026
Co-authored-by: sunwoo162 <205418898+sunwoo162@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제
playwright.config.ts가 CI가 아니면reuseExistingServer: true였습니다. 그래서 로컬에서 4173 포트에 다른 worktree나 이전 빌드의 서버가 떠 있으면, 이 트리가 아닌 다른 빌드를 검사하고도 통과나 실패를 보고했습니다. 페이지 분해 작업(#192~#195)을 여러 worktree에서 동시에 검증하다가 실제로 겪은 문제입니다. CI는CI=true라 영향이 없었습니다.수정
E2E_PORT로 포트를 바꿀 수 있습니다(동시 실행용).E2E_REUSE_SERVER=1로 재사용합니다.visual-change라벨을 적었습니다.확인
E2E_PORT=4190 npx playwright test e2e/routes.e2e.ts통과npm run check통과🤖 Generated with Claude Code