Repository navigation
fix: sync 입력 제약 보강 및 회귀 신호 없는 테스트 정리 - #20
Merged
Merged
Conversation
테스트 카테고리 7종 규칙을 기존 코드에 적용한 결과다. model 이 컬럼 폭(VARCHAR(80))을 넘어도 검증을 통과해 네이티브 INSERT 까지 내려가 500 이 났고, @transactional 이라 그 sync 배치 전체가 롤백됐다. 토큰 필드는 상한이 없어 집계 SUM 에서 bigint 오버플로가 가능했다. - TokenRecordRequest: model @SiZe(80), 토큰 4필드 @max(1e11) - SyncRequest: records @SiZe(10000) - SyncSchemaConstraintTest(신규): 제약값과 DDL 을 대조 - SyncControllerTest(신규): @Valid -> 400, 미인증 -> 401 배선 검증 - CardClaudeBadgeThemeTest: 레벨 임계 직전/직후 9케이스 추가 - 세터 왕복, 복합키 중복 등 회귀 신호 없는 테스트 8건 제거 유닛 493, 통합 37 통과.
2 of 5 tasks
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.
🏷️ 작업 유형
📋 변경 사항
입력 제약 보강
TokenRecordRequest.model에@Size(80)추가 — 컬럼 폭(VARCHAR(80)) 초과 시 500 대신 400 반환@Max(1e11)추가 — 집계SUM의 bigint 오버플로 차단SyncRequest.records에@Size(10000)추가 — 무제한 역직렬화로 인한 OOM 차단기존 동작:
@Transactional로 sync 배치 전체 롤백Long.MAX급테스트 강화
SyncSchemaConstraintTest신규 — 제약값과 마이그레이션 DDL을 수치로 대조SyncControllerTest신규 —@Valid→ 400, 미인증 → 401 배선 검증CardClaudeBadgeThemeTest에 레벨 임계 직전/직후 9케이스 추가테스트 정리
equals개별 6건 제거 — 같은 클래스의 파라미터화 테스트와 완전 중복✅ 테스트
./mvnw test— 493건 통과 (476 − 8 + 25)./mvnw verify— 통합 37건 포함 통과SyncValidationTest3건 실패 → 통과)