Skip to content

[TEST] 테스트 적용#379

Merged
taerimiiii merged 2 commits into
mainfrom
develop
Jun 19, 2026
Merged

[TEST] 테스트 적용#379
taerimiiii merged 2 commits into
mainfrom
develop

Conversation

@taerimiiii

Copy link
Copy Markdown
Contributor

🔗 Related Issue

  • resolve #이슈번호

✨ 작업 개요

작업 내용을 간략하게 작성해주세요.

체크리스트

  • Reviewers, Assignees, Labels를 모두 등록했나요?
  • .gitignore 설정을 하였나요?
  • PR 머지 전 반드시 CI가 정상적으로 작동하는지 확인해주세요!

📷 이미지 첨부 (선택)

  • 작업 결과를 확인할 수 있는 이미지나 GIF를 첨부해주세요.
  • UI 변경, API 응답 샘플, 테스트 결과 등이 포함되면 좋아요!

🧐 집중 리뷰 요청

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요.

@taerimiiii taerimiiii added the 🧪 test 테스트 코드 label Jun 19, 2026
@taerimiiii taerimiiii self-assigned this Jun 19, 2026
@taerimiiii taerimiiii merged commit 96e79cf into main Jun 19, 2026
2 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the hardcoded cron schedules for various alarm and cache rebuilding tasks in AlarmSchedulerService and PinGeoScheduler. The review feedback recommends externalizing these cron expressions to application properties using Spring placeholders, which improves flexibility across different environments and prevents accidental production changes during testing.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

// 기존 설정 시각
//@Scheduled(cron = "0 0 13 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "0 5 15 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "0 0 14 * * *", zone = "Asia/Seoul")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

스케줄러의 크론(cron) 표현식을 소스 코드에 하드코딩하면, 테스트 환경이나 운영 환경에 따라 주기를 변경할 때마다 코드를 수정하고 재빌드해야 합니다. 특히 테스트를 위해 임시로 수정한 크론 설정이 실수로 운영 환경에 반영될 위험이 있습니다. Spring의 프로퍼티 플레이스홀더를 사용하여 크론 표현식을 외부 설정 파일(application.yml)로 관리하고, 기본값을 제공하는 방식을 권장합니다.

Suggested change
@Scheduled(cron = "0 0 14 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "${app.scheduler.cron.event:0 0 14 * * *}", zone = "Asia/Seoul")

// 기존 설정 시각
//@Scheduled(cron = "0 0 10 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "2 5 15 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "1 0 14 * * *", zone = "Asia/Seoul")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

상점 알림 스케줄러의 주기도 외부 설정을 통해 관리하도록 변경하는 것을 권장합니다.

Suggested change
@Scheduled(cron = "1 0 14 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "${app.scheduler.cron.store:1 0 14 * * *}", zone = "Asia/Seoul")

// 기존 설정 시각
//@Scheduled(cron = "0 0 18 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "4 5 15 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "2 0 14 * * *", zone = "Asia/Seoul")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

핫 알림 스케줄러의 주기도 외부 설정을 통해 관리하도록 변경하는 것을 권장합니다.

Suggested change
@Scheduled(cron = "2 0 14 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "${app.scheduler.cron.hot:2 0 14 * * *}", zone = "Asia/Seoul")

private final RedisTemplate<String, String> redisTemplate;

@Scheduled(cron = "0 0 5 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "0 25 13 * * *", zone = "Asia/Seoul")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

캐시 재구성 스케줄러의 주기 또한 외부 설정을 통해 관리하는 것이 좋습니다. 환경별로 배치 실행 시간을 다르게 제어하거나, 테스트 시에만 주기를 단축하여 검증하기가 훨씬 수월해집니다.

Suggested change
@Scheduled(cron = "0 25 13 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "${app.scheduler.cron.geo-rebuild:0 25 13 * * *}", zone = "Asia/Seoul")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧪 test 테스트 코드

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant