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

Fix SQLiteDatabaseTest foreign key test to match Android behavior #6643

Merged
merged 1 commit into from Aug 8, 2021

Conversation

copybara-service[bot]
Copy link

Fix SQLiteDatabaseTest foreign key test to match Android behavior

SQLiteDatabaseTest.shouldThrowWhenForeignKeysConstraintIsViolated failed if run
on a real Android. It expected that a foreign key exception be thrown. In real
Android, however, no exception was thrown. Only a message is printed in logcat.

Update the test to delete a row that has a reference to another table. This
causes an exception in both real Android and Robolectric. Move this to a
ctesque test to ensure fidelity with real Android.

SQLiteDatabaseTest.shouldThrowWhenForeignKeysConstraintIsViolated failed if run
on a real Android. It expected that a foreign key exception be thrown. In real
Android, however, no exception was thrown. Only a message is printed in logcat.

Update the test to delete a row that has a reference to another table. This
causes an exception in both real Android and Robolectric. Move this to a
ctesque test to ensure fidelity with real Android.

PiperOrigin-RevId: 386770883
@hoisie hoisie merged commit 344b52e into master Aug 8, 2021
@hoisie hoisie deleted the piper_386770883 branch August 8, 2021 05:51
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.

None yet

1 participant