Skip to content

Fix the unit test that turned CI red on main - #51

Merged
sethusrinivasan merged 1 commit into
mainfrom
fix/roomdbfiles-header-test
Sep 23, 2026
Merged

sethusrinivasan merged 1 commit into
mainfrom
fix/roomdbfiles-header-test

Conversation

@sethusrinivasan

Copy link
Copy Markdown
Owner

Summary

  • RoomDbFiles.inspect() treats anything under 100 bytes as “too small” and never looks at the SQLite header.
  • The non sqlite header is rejected test wrote 36 bytes of text, then asserted the header error (Not a SQLite file). That mismatch is what failed testDebugUnitTest on main.
  • The fixture is now long enough to reach the header check, which is what the test was actually trying to cover.

Test plan

  • Confirm the failing run matches this diagnosis
  • Wait for testDebugUnitTest on this PR to go green
  • Optional: ./gradlew :app:testDebugUnitTest --tests com.app.paperstow.data.backup.RoomDbFilesTest

Made with Cursor

inspect() rejects files under 100 bytes before it reads the header. The test was writing 36 bytes and then expecting the header error, which is why main went red.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI lite review requested due to automatic review settings September 23, 2026 04:18

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sethusrinivasan
sethusrinivasan merged commit f57b138 into main Sep 23, 2026
7 checks passed
@sethusrinivasan
sethusrinivasan deleted the fix/roomdbfiles-header-test branch September 23, 2026 04:24
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