[Chore] Room DAO 테스트 기반 추가와 전송 대기 행 쿼리 검증 #596 - #597
Merged
Conversation
This file contains hidden or 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
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.
#️⃣연관된 이슈
Closes #596
📝작업 내용
Room DAO의 SQL이 실제로 실행되는 테스트를 넣었습니다.
Robolectric을 data 모듈 테스트에만 추가하고 메모리 DB 헬퍼를 하나 뒀습니다. targetSdk 36은 Robolectric 4.14가 아직 지원하지 않아 sdk 34로 고정했습니다. androidTest가 아니라 단위 테스트에 둔 이유는 CI가
testDebugUnitTest만 돌려서입니다.검증 대상은 계정 조건, 날짜 범위 경계,
DELETE_PENDING제외, 전송 대기 행 보존, 목록과 상세 동시 삭제입니다.ExerciseRecordLocalDataSourceTest가 DAO를 목킹해 호출 인자만 보고 있어서 실제 DB 테스트로 바꿨습니다. 테스트 26개에:data:testDebugUnitTest가 30초쯤 걸립니다.androidx-room-testing은 넣지 않았습니다.MigrationTestHelper를 쓸 곳이 아직 없습니다.스크린샷 (선택)
테스트만 추가했습니다.
💬리뷰 요구사항(선택)
목킹 테스트를 실제 DB 테스트로 대체했습니다. 목킹 쪽을 남겨둘 이유가 있으면 알려주세요.