Skip to content

fix(streak): format reminder title templates#337

Merged
SolfE merged 1 commit into
developfrom
fix/streak-protection-flaky-test
Jun 23, 2026
Merged

fix(streak): format reminder title templates#337
SolfE merged 1 commit into
developfrom
fix/streak-protection-flaky-test

Conversation

@SolfE

@SolfE SolfE commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

스트릭 보호 알림 메시지의 title 템플릿도 streak count로 포맷하도록 수정했습니다. 랜덤 메시지 선택에 따라 실패하던 StreakProtectionSchedulerTest 검증도 title/body 전체 기준으로 바꿨습니다.

Problem

STREAK_PROTECTION 메시지 중 일부는 %d placeholder를 body가 아니라 title에 포함합니다. 기존 스케줄러는 body만 String.format으로 치환해서, 해당 메시지가 랜덤 선택되면 실제 알림 title에 %d가 그대로 노출될 수 있었습니다. 테스트도 body에만 streak count가 있다고 가정해 랜덤 메시지 선택에 따라 비결정적으로 실패했습니다.

Solution

알림 요청 생성 시 title과 body를 모두 현재 streak count로 포맷합니다. 테스트는 title과 body를 합친 실제 알림 메시지 전체에 streak count가 포함되는지 검증하도록 변경했습니다.

Changes

  • StreakProtectionScheduler에서 message.getTitle()에도 String.format 적용
  • messageContainsStreakCount 테스트를 title/body 전체 검증으로 변경
  • 변경된 Java 파일에 Spotless 포맷 적용

Example

기존에는 title 템플릿이 %d일 스트릭이 기다려요인 메시지가 선택되면 %d가 그대로 전송될 수 있었습니다. 이제 현재 streak가 7이면 7일 스트릭이 기다려요로 포맷됩니다.

Related Issues

없음

Validation

  • ./gradlew test --tests StreakProtectionSchedulerTest --rerun-tasks 3회
  • ./gradlew spotlessCheck
  • ./gradlew check

@SolfE SolfE marked this pull request as ready for review June 23, 2026 09:39
@SolfE SolfE merged commit ac9dfcb into develop Jun 23, 2026
1 check passed
@SolfE SolfE deleted the fix/streak-protection-flaky-test branch June 23, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant