Repository navigation
test(python): 통합 시험의 Keycloak 준비 탐침 경합 — 주 포트의 404 를 다시 묻는다 - #899
Merged
Merged
Conversation
…션 전체가 setup 오류였다 testcontainers 의 `_readiness_probe` 는 관리 포트(9000)가 연결 오류면 주 포트(8080)의 `/health/ready` 로 넘어가는데, Keycloak 25+ 의 주 포트에는 health 가 없어 404 이고 `raise_for_status` 의 HTTPError 는 데코레이터가 재시도하지 않는다 (ConnectionError·ReadTimeout 만). 기동 중 주 포트가 먼저 열리면 그 순간 실패해 통합 시험 31 개가 setup 오류였다 (#898 의 CI 2026-10-29 — 실패 URL 이 주 포트 `localhost:32769/health/ready` · 같은 코드로 실패 잡만 다시 돌리니 통과). `KeycloakContainer` 를 상속해 404 면 관리 포트가 열릴 때까지(180 초 한도) 다시 묻는다 — 부모 탐침을 그대로 부르므로 testcontainers 4.14·4.15 어느 구조에도 맞는다. 로컬 Docker 로 통합 시험 31 개 통과(rc 0). ruff · format 깨끗. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R4jYS5GwFA8V5oAqjw8pMp
|
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.



무엇
#898 의 CI 에서 python 통합 시험 31 개가 전부 setup 오류였다(
requests.exceptions.HTTPError: 404 … localhost:32769/health/ready). 원인은 testcontainers 의 Keycloak 준비 탐침이다./health/ready로 넘어간다.raise_for_status의 HTTPError 는 데코레이터가 다시 묻지 않는다 — 재시도는 ConnectionError·ReadTimeout 만 한다.그래서 기동 중 주 포트가 관리 포트보다 먼저 열리는 순간에 걸리면 세션 전체가 실패한다. 같은 코드로 실패 잡만 다시 돌리니 통과했다 — 경합이다.
고침
python/tests/integration/conftest.py에서KeycloakContainer를 상속한다. 404 면 관리 포트가 열릴 때까지(180 초 한도) 다시 묻는다. 부모 탐침을 그대로 부르므로 testcontainers 4.14(로컬) · 4.15(CI) 어느 구조에도 맞는다.검증
pytest -m integration31 개 통과(rc 0).🤖 Generated with Claude Code
https://claude.ai/code/session_01R4jYS5GwFA8V5oAqjw8pMp