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

Delete cached error reports if an Exception is thrown during disk IO, preventing delivery of empty/partial reports on the next app launch #609

Merged
merged 9 commits into from Oct 8, 2019

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Oct 4, 2019

Goal

Delete cached error reports if an Exception is thrown during disk IO, preventing delivery of empty/partial reports on the next app launch.

Additionally improves E2E and instrumentation test coverage for internal report behaviour.

Changeset

This changeset deletes a file if an exception is thrown when writing it to disk. This is intended to prevent empty/partial files being unintentionally left on disk for delivery next launch.

Added/moved existing mazerunner scenarios so that tests cover:

  • If an empty file is in the cache directory then zero requests should be made
  • If a partial file is in the cache directory then an internal report should be sent
  • If a file is deleted before it can be sent, 0 requests should be sent

Added instrumentations tests that cover:

  • If an exception is thrown when writing a Streamable, an internal error report is sent (measured by invoking a delegate) and the partial file is deleted
  • If an exception is thrown when copying a NDK report, an internal error report is sent (measured by invoking a delegate) and the partial file is deleted

@fractalwrench fractalwrench changed the title Add E2E/instrumentation tests for JSON serialization/deserialization on Android Delete cached error reports if an Exception is thrown during disk IO, preventing delivery of empty/partial reports on the next app launch Oct 7, 2019
CHANGELOG.md Show resolved Hide resolved
@fractalwrench fractalwrench merged commit 8970195 into master Oct 8, 2019
@fractalwrench fractalwrench deleted the serialization-e2e-tests branch October 8, 2019 16:03
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

2 participants