-
Notifications
You must be signed in to change notification settings - Fork 16
[신동진] Sprint12 #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[신동진] Sprint12 #172
Conversation
* 배포 아키텍처 구성하기는 재공부가 필요함 * SSE 구현은 메서드 로직 리팩토링 및 역할이해 필요
| @Controller | ||
| public class MessageWebSocketController { | ||
| // 첨부파일이 없는 단순 텍스트 메시지인 경우 STOMP를 통해 메시지를 전송할 수 있도록 컨트롤러 구현 | ||
| private final SimpMessagingTemplate messageTemplate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SimpMessagingTemplate 이걸 서비스나 리스너 등에 주입받도록 구현하시는게 훨씬 책임이 분리된 로직으로 보입니다.
| @RestController | ||
| @RequiredArgsConstructor | ||
| public class SseController { | ||
| private final SseEmitterRepository emitterRepository; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SseEmitterRepository 가 여기서 직접 주입되어 구현되면 안됩니다. 해당 로직은 sse service에서 구현하는 방향으로 변경해보세요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements comprehensive test coverage for a Discord-like application including unit tests, integration tests, and test infrastructure configuration. The changes add testing for all major service layers, controllers, repositories, security components, and event listeners.
Key Changes
- Added extensive unit test coverage for service layer components (User, Message, Channel, Notification, BinaryContent, ReadStatus, Auth services)
- Implemented integration tests for API endpoints and business workflows
- Added test configuration files and test-specific application settings
- Created tests for storage implementations (S3 and local), security/JWT components, and event listeners
Reviewed Changes
Copilot reviewed 195 out of 201 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/resources/application-test.yaml | Test environment configuration with H2 database and test-specific JWT settings |
| src/test/java/.../storage/s3/* | S3 storage integration tests for file upload/download operations |
| src/test/java/.../service/basic/* | Unit tests for all basic service implementations using Mockito |
| src/test/java/.../security/* | Tests for JWT authentication, login flow, and CSRF protection |
| src/test/java/.../repository/* | Repository layer tests with @DataJpaTest for database operations |
| src/test/java/.../integration/* | End-to-end API integration tests for all major features |
| src/test/java/.../event/listener/* | Event listener tests for notification and binary content events |
| src/test/java/.../controller/* | Controller layer tests with MockMvc for HTTP endpoint validation |
| src/main/resources/static/* | Static frontend assets (index.html, CSS bundle) |
| src/main/resources/*.yaml | Application configuration files for dev, prod, and base profiles |
| src/main/resources/schema.sql | Database schema definition with tables and constraints |
| src/main/resources/logback-spring.xml | Logging configuration with MDC support |
| src/main/java/.../storage/* | Storage implementation interfaces and S3/local implementations |
| src/main/java/.../service/basic/* | Service implementations with SSE support and caching |
| settings.gradle | Gradle project configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
요구사항
기본
심화
주요 변경사항
스크린샷
멘토에게