Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a retry utility function that automatically retries failed asynchronous operations a specified number of times. The function accepts any async operation and will re-execute it upon failure until either it succeeds or the retry limit is reached.
Key changes:
- Added
retryutility function with configurable retry attempts (default: 3) - Comprehensive test coverage including edge cases, type safety, and boundary conditions
- Exported the new utility from the commonUtil index
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package/commonUtil/retry/index.ts | Core retry logic with generic type support and recursive attempt mechanism |
| package/commonUtil/retry/index.test.ts | Complete test suite covering success cases, retry scenarios, error handling, and type safety |
| package/commonUtil/index.ts | Export statement to make retry utility publicly available |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
prgmr99
left a comment
There was a problem hiding this comment.
캬아.. 테스트 코드 보면서 새롭게 배운 것들도 많네요!!!
고생하셨습니다!
진짜 테스트 코드 모르는게 많아서 너무 어려웠습니다 ㅎㅎ.. |
Description
retry유틸 함수를 개발했어요, 만약 서버 데이터 통신 함수와 같은 로직을 넣게 되면 원하는 재시도 횟수만큼 성공할 때까지 재시도를 해줘요