This repository was archived by the owner on Dec 6, 2025. It is now read-only.
feat: Poll/Notice 알림 전송 안정화 및 테스트 정비#220
Merged
Merged
Conversation
- getApartmentNameByIdRepo 추가(apartments.repo) - auth.service에서 apartmentName 기반 조회로 통일 - 알림 전송용 getUserIdsForApartment(apartmentName) 연동 보강
- activate/expire handler에서 apartmentName 기반으로 통일 - SSE 전송을 createAndSendNotification으로 일원화 - 전송 실패 try/catch 처리(best-effort)
- createNoticeService에서 아파트 주민 전체 알림 전송 - Promise.allSettled 사용해 실패 무시 - apartmentName 기반으로 통일
- getUserIdsForApartment가 apartmentName을 기준으로 동작하도록 관련 레포/서비스 정비 (apartment.repo, auth.repo, auth.service 에 헬퍼 함수 추가) - 공지 생성 시 주민 전체 알림 전송 로직 보강 (전송 실패 시 개별 ignore, Promise.allSettled 적용) - Poll Activate/Expire 핸들러 알림 전송에 try/catch 적용 및 best-effort 전송으로 변경 - Poll Activate/Expire 통합 테스트에서 pollId 기준 SSE 필터링 로직 추가 (다른 테스트의 타이머·잔여 call 간섭 제거) - notifications 테스트의 mock 유저 충돌 해결 및 겹치는 fixture 정리 - 전체 SSE 호출 흐름 정합성 재검증 및 안정화
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
주요 변경 사항
1) Poll Activate / Expire 알림이 해당 아파트 주민 전체 + 관리자에게 전송되도록 개선했습니다.
try/catch적용Limiter) 적용 유지2) Notice 생성 시 알림 전송 기능을 추가했습니다.
3) Poll Activate/Expire 통합 테스트 수정
4) 1~2 관련 헬퍼 함수를 추가했습니다.