fix(recommendation): New & Hot 스냅샷 저장 수를 확장한다

This commit is contained in:
2026-06-27 05:49:16 +09:00
parent f99ed002b2
commit 6ab8d65207
2 changed files with 27 additions and 4 deletions
@@ -30,7 +30,7 @@ class AudioRecommendationSnapshotRefreshServiceTest {
newAndHotWindowStart,
snapshotAt,
AudioRecommendationVisibility.SAFE,
AudioRecommendationSnapshotRefreshService.NEW_AND_HOT_LIMIT
AudioRecommendationSnapshotRefreshService.NEW_AND_HOT_SNAPSHOT_LIMIT
)
Mockito.verify(queryPort).findMostCommentedSnapshots(
mostCommentedWindowStart,
@@ -66,7 +66,7 @@ class AudioRecommendationSnapshotRefreshServiceTest {
newAndHotWindowStart,
snapshotAt,
AudioRecommendationVisibility.SAFE,
AudioRecommendationSnapshotRefreshService.NEW_AND_HOT_LIMIT
AudioRecommendationSnapshotRefreshService.NEW_AND_HOT_SNAPSHOT_LIMIT
)
Mockito.verify(queryPort).findMostCommentedSnapshots(
mostCommentedWindowStart,
@@ -81,4 +81,27 @@ class AudioRecommendationSnapshotRefreshServiceTest {
AudioRecommendationSnapshotRefreshService.RECOMMENDED_AUDIO_LIMIT
)
}
@Test
@DisplayName("New & Hot 스냅샷은 visibility별 100개 후보를 저장한다")
fun shouldRequestOneHundredNewAndHotSnapshotsPerVisibility() {
val now = LocalDateTime.of(2026, 6, 27, 0, 0, 0)
val snapshotAt = LocalDateTime.of(2026, 6, 26, 23, 59, 59)
val windowStart = LocalDateTime.of(2026, 6, 24, 0, 0, 0)
service.refreshDailySnapshots(now)
Mockito.verify(queryPort).findNewAndHotSnapshots(
windowStart,
snapshotAt,
AudioRecommendationVisibility.SAFE,
100
)
Mockito.verify(queryPort).findNewAndHotSnapshots(
windowStart,
snapshotAt,
AudioRecommendationVisibility.ALL,
100
)
}
}