test: pin the stuck active-call notification after a service restart (WT-1139) - #366
Merged
Merged
Conversation
… restart (WT-1139) When the system restarts the active-call service after a process kill, the user is left with a half-empty ongoing call notification that cannot be swiped away, and Hang up does nothing. These tests reproduce that scenario and pin the current behavior so the defect is executable and visible; the upcoming fix is expected to flip the restart-path expectations. Also enables Android resources in unit tests so notification content can be built under Robolectric.
…tests (WT-1139) The tests describing how the restart path must behave after the fix - stop the empty service and remove its notification - are added commented out, with a note to enable them together with the fix and retire the tests that pin the defect. Verified that enabled as-is they fail on the current code exactly where the defect lives.
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.
Overview
After a process kill the system can restart the active-call service with nothing to show. The user is then left with a half-empty ongoing call notification that cannot be swiped away, and Hang up on it does nothing.
This change adds unit tests only, no production code: they reproduce that scenario and pin the current behavior, so the defect stays executable and a change in either direction is visible. The healthy path with real calls is pinned alongside. The expectations for the fixed behavior are also included as commented-out tests with a note to enable them together with the fix and retire the pinning ones; the fix in #346 carries its own version of this file, which supersedes it.
Verified with the Android unit test suite (251 tests, 0 failures). Both directions were proven: a temporary mutation of the restart path turns exactly the three pinning tests red, and the commented-out tests, temporarily enabled, fail on the current code exactly where the defect lives.