Skip to content
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

[BE] 멤버 도메인 미사용 컬럼 삭제 및 필드명 통일 #956

Conversation

koust6u
Copy link
Member

@koust6u koust6u commented Nov 7, 2024

연관된 이슈

구현한 기능

  1. 미사용 profileImage 컬럼 삭제
  2. 깃허브 측에서 받는 데이터는 Provider 접두사 붙힘
  3. Member 도메인 테스트 더미 값 test/java/src/~~/ member/support 패키지에 묵어둠

상세 설명

테스트 총 실행 시간: 13초 388
image
에서
image
7초 536으로 개선

  1. 레퍼런스 생성 시 Jsoup으로 실제 Html 호출을 Fake객체로 테스팅 시 호출 막음. 5초 가량 개선
    2.SSE (이젠 안쓰이겠지만.. ) Fake 객체 Timeout Duration 500ms -> 1ms으로 변경. 2초가량 개선


import site.coduo.member.domain.Member;

public abstract class MemberDummy {
Copy link
Contributor

Choose a reason for hiding this comment

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

좋네요
그럼 다른 fixture 들도 이런 방식으로 바꾸는게 좋을까요?

Copy link
Member Author

Choose a reason for hiding this comment

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

일단 테스트 코드 제가 담당하기로 해서 만약 member같이 중복되는 fixture들이 많으면 제가 최대한 수정해보겠습니다!

Copy link
Member

@reddevilmidzy reddevilmidzy left a comment

Choose a reason for hiding this comment

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

멤버 관련 리팩터링은 브랜치 member-refactor 에서 한번에 모아서 dev로 가시려는거죠?

Copy link
Member

Choose a reason for hiding this comment

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

캬 좋습니다 테스트 코드가 한층 더 깔꼼해졌네요

한가지 고민은 몇가지 fixture가 있는데 요 놈들은 test 패키지 하단에 fixture 패키지에 모여있습니다. MemberDummy 클래스는 이 fixture들과는 살짝 성격이 다른 거 같긴(fixture들은 상수 모아둠, memberdummy는 뭔가 메이커 느낌) 하지만 이렇게 패키지 구조를 가져가신 이유가 있으실까요?!

Copy link
Member Author

Choose a reason for hiding this comment

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

멤버 관련 리팩터링은 브랜치 member-refactor 에서 한번에 모아서 dev로 가시려는거죠?

네 맞습니다.

한가지 고민은 몇가지 fixture가 있는데 요 놈들은 test 패키지 하단에 fixture 패키지에 모여있습니다. MemberDummy 클래스는 이 fixture들과는 살짝 성격이 다른 거 같긴(fixture들은 상수 모아둠, memberdummy는 뭔가 메이커 느낌) 하지만 이렇게 패키지 구조를 가져가신 이유가 있으실까요?!

우선 fixture package를 보지 못했어요. fixture 패키지로 이동 시켜도 큰 문제 없을 거 같아요.

Comment on lines 323 to 328
final Member me = MemberDummy.createDummy("pairNameA",jwtProvider.sign("pairA"), "pairA","loginIdA");
memberRepository.save(me);

final Member pair = memberRepository.save(
Member.builder()
.userId("pairB")
.accessToken(jwtProvider.sign("pairB"))
.loginId("pairB")
.username("pairNameB")
.profileImage("some image")
.build()
);
final Member pair =MemberDummy.createDummy("pairNameB",jwtProvider.sign("pairB"), "pairB", "loginIdB");
memberRepository.save(pair);

Copy link
Member

Choose a reason for hiding this comment

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

요 클래스 자동 정렬 단축키 한번 해주세욥!

Copy link
Contributor

@JiHyeonL JiHyeonL left a comment

Choose a reason for hiding this comment

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

오우 수고하셨습니다 👍

final String providerLoginId,
final String providerUserId,
final String username,
final LocalDateTime deletedAt) {
Copy link
Contributor

Choose a reason for hiding this comment

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

요기도 마지막 파라미터 다음 엔터 한번 쳐주세욥


import site.coduo.member.domain.Member;

public abstract class MemberDummy {
Copy link
Contributor

Choose a reason for hiding this comment

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

👏👏

@koust6u koust6u self-assigned this Nov 24, 2024
Copy link
Member

@reddevilmidzy reddevilmidzy left a comment

Choose a reason for hiding this comment

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

👍

@koust6u koust6u merged commit c6448eb into BE/feature/#951-member-refactor Jan 7, 2025
1 check passed
@koust6u koust6u deleted the BE/feature/#952-member-entity-seperate branch January 7, 2025 05:08
koust6u added a commit that referenced this pull request Jan 7, 2025
* [BE] 멤버 도메인 미사용 컬럼 삭제 및 필드명 통일  (#956)

* refactor: 사용하지 않는 컬럼 삭제 및 더미 멤버 상수화

* test: fixture 관련 클래스 패키지 이동

* refactor: Entity 도메인 분리

* test: Jsoup fake 객체로 테스팅

* test: 테스트 SSE timeout Duration 500ms -> 1ms

* test: 마시용 import 문 삭제
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.

4 participants