Skip to content

[Test/#211] 핵심 로직 테스트 코드 작성 - #213

Merged
ThirFir merged 34 commits into
developfrom
test/#211
Jul 1, 2025
Merged

[Test/#211] 핵심 로직 테스트 코드 작성#213
ThirFir merged 34 commits into
developfrom
test/#211

Conversation

@ThirFir

@ThirFir ThirFir commented Jun 29, 2025

Copy link
Copy Markdown
Collaborator

🧨 Issue

💻 Work Description

  • 테스트 의존성 정리
  • 유저 정보 관리 로직 수정
  • Authenticator 모듈 app -> data 이동
  • 핵심 비즈니스 로직 테스트 코드 작성
    • Authenticator
    • UserRepository
    • 거리계산 Usecase
    • Time Util

💭 To Reviewers

  • 다음 목표는 빌드 CI에서 테스트 코드도 검사하기...

ThirFir added 30 commits June 30, 2025 03:42
@ThirFir
ThirFir requested a review from 1971123-seongmin June 29, 2025 18:43
@ThirFir ThirFir self-assigned this Jun 29, 2025

@1971123-seongmin 1971123-seongmin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

고생하셨습니다

_userType.emit(UserType.GUEST)
else
_userType.emit(UserType.USER)
private val userType = _userType.asStateFlow()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

기존 방식에서 _userType.asStateFlow와 scope.launch 방식으로 바꾸신 이유를 설명해주실 수 있나요??

@ThirFir ThirFir Jul 1, 2025

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

동작에는 문제없었는데, 코드가 좀 모호해보여서 좀 더 명확해보이게 바꿧습니다

reissueTokenApi: ReissueTokenApi,
appLauncher: AppLauncher
): Authenticator = AuthAuthenticator(context, tokenLocalDataSource, userRepository, reissueTokenApi, appLauncher)
): Authenticator = AuthAuthenticator(context, tokenLocalDataSource, sessionHandler, reissueTokenApi, appLauncher)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

기존에 여기에서 순환참조 문제가 발생했었나요?? 간단히 설명해주실 수 있나요??

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

기존에 Authenticator에서 SessionManager를 사용하던걸 그냥 UserRepository를 사용하는걸로 리팩토링했는데,
여기서 순환참조 발생하더라구여
UserRepository -> UserRemoteDataSource -> UserApi -> Retrofit -> OkHttpClient -> Authenticator -> UserRepository -> ...

그래서 다시 SessionHandler라는 이름으로 부활시켰습니다,,,

@ThirFir
ThirFir merged commit 5c67767 into develop Jul 1, 2025
1 check passed
@ThirFir
ThirFir deleted the test/#211 branch July 1, 2025 14:15
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.

2 participants