Skip to content

Commit

Permalink
test: 처리되지 못한 Pending 메세지 처리 테스트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
seungh1024 committed May 17, 2024
1 parent cd921e1 commit c78a99c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ void not_consumed_pending_message_will_rollback() throws InterruptedException {
// 3초 이상 된 메세지만 claim 처리를 하므로 3초 기다린다
executor.getThreadPoolExecutor().awaitTermination(3, TimeUnit.SECONDS);

// claim처리 안된 메세지 claim 처리
PendingMessages pendingMessages = redisOperator.findPendingMessages(streamKey, consumerGroup, consumerName);
for (PendingMessage pendingMessage : pendingMessages) {
redisOperator.claimMessage(pendingMessage, streamKey, claimConsumerName);
}

// When
executor.initialize();
pendingMessageScheduler.consumeClaimMessage();
Expand Down

0 comments on commit c78a99c

Please sign in to comment.