Skip to content

Conversation

@beekeeper24
Copy link
Collaborator

  • mock Redis 커넥션/템플릿을 주입해서 JwtAuthenticationFilter 테스트 시 NPE 방지 (실제 Redis 연결이 없어서 터지던 문제 해결)
  • 테스트 전용 ObjectMapper에 JavaTimeModule + KotlinModule 등록해 ZonedDateTime 직렬화 오류 해결

@beekeeper24 beekeeper24 requested a review from Copilot October 11, 2025 03:40
@beekeeper24 beekeeper24 self-assigned this Oct 11, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Fixes NullPointerException in controller tests by mocking Redis dependencies and resolves ZonedDateTime serialization errors with proper ObjectMapper configuration.

  • Adds comprehensive mocking for Redis connection and template to prevent NPE during JWT filter tests
  • Configures test ObjectMapper with JavaTimeModule and KotlinModule for proper ZonedDateTime serialization
  • Changes entity ID fields from val to var to support test data manipulation

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
TestConfig.kt Adds Redis mocks and ObjectMapper configuration for tests
ChatRoom.kt Changes ID field from immutable to mutable for test flexibility
ChatMessage.kt Changes ID field from immutable to mutable for test flexibility

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@YangHJ2415 YangHJ2415 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!

@YangHJ2415 YangHJ2415 merged commit fbb2213 into main Oct 11, 2025
1 check passed
@beekeeper24 beekeeper24 deleted the fix/be/3 branch October 12, 2025 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants