-
Notifications
You must be signed in to change notification settings - Fork 7
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] 시간에 따라 실패하는 테스트 수정 #539
Open
Hongdonggeon
wants to merge
1
commit into
dev
Choose a base branch
from
feature/be/test-fix
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Hongdonggeon
added
🐞 bug
Something isn't working
🌾 backend
Anything related to back-end
labels
Oct 20, 2022
Hongdonggeon
requested review from
progress0407,
syoun602,
shindong96 and
YJGwon
October 20, 2022 01:59
📊 checkmate-sonarqube-539 분석 결과 확인하기 링크 |
YJGwon
requested changes
Oct 20, 2022
final LocalDate date = LocalDate.now(); | ||
final Event event = EVENT_WITHOUT_DATE.createEventOnDate(meeting, date); | ||
final LocalTime time = LocalTime.of(10, 0); | ||
final LocalDateTime now = LocalDateTime.of(date, time.plusMinutes(1)); |
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.
변수명 fakeNow
또는 mockNow
처럼 실제 시간이 아닌 가짜 값임을 나타낼 수 있게 rename하는건 어떤가요?
progress0407
requested changes
Oct 20, 2022
|
||
final List<Long> userIds = saveUsers(createUsers()); | ||
final Meeting meeting = MORAGORA.create(); | ||
final int meetingId = saveMeeting(token, userIds, meeting); | ||
final Event event = EVENT_WITHOUT_DATE.createEventOnDate(meeting, date); | ||
final Event event = EVENT_WITHOUT_DATE.createEventOnDateAndTime(meeting, date, time); |
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.
createEventOnDateTime
도 괜찮을 것 같아요 :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Close #538
PR 타입(하나 이상의 PR 타입을 선택해주세요)
반영 브랜치
feature/be/test-fix -> dev
요구사항
변경사항
이슈에 기대동작과 현재 동작에 대해 자세하게 써놓았습니다. 한번 확인해주세요~
[BE] 시간에 따라 실패하는 테스트 수정 #538
EventFixtures의 시간을 파라미터로 전달받는 createEventOnDateAndTime으로 Event를 생성하고 파라미터로 넘겨준 시간보다 더 큰 시간으로 serverTimeManager.getDateAndTime을 mocking 하였습니다.