Close hit queue on Edge unregistration#27
Merged
emdobrin merged 4 commits intoadobe:dev-v2.0.0from Jan 18, 2023
Merged
Conversation
For restart tests, reset the ServiceProvider to create new instance of DataQueue. Clear database after functional tests.
Codecov Report
@@ Coverage Diff @@
## dev-v2.0.0 #27 +/- ##
================================================
+ Coverage 79.38% 83.17% +3.79%
- Complexity 372 380 +8
================================================
Files 29 29
Lines 1542 1545 +3
Branches 219 219
================================================
+ Hits 1224 1285 +61
+ Misses 217 161 -56
+ Partials 101 99 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
emdobrin
reviewed
Jan 18, 2023
code/edge/src/androidTest/java/com/adobe/marketing/mobile/util/FunctionalTestHelper.java
Outdated
Show resolved
Hide resolved
code/edge/src/androidTest/java/com/adobe/marketing/mobile/RestartFunctionalTests.java
Show resolved
Hide resolved
emdobrin
approved these changes
Jan 18, 2023
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.
Description
Close the hit queue on Edge extension
onUnregisterhandler to ensure the PersistentHitQueue executor is stopped and the underlying DataQueue is closed.Update RestartFunctionalTests to additionally restart the ServiceProvider when restarting Mobile Core, in order to create a new instance of the DataQueueService. A new instance of the DataQueueService is needed because when the Mobile Core is reset and the Edge extension is unregistered, the DataQueue is closed and cannot be reused.
Delete the application database directory after each functional test to preserve test isolation in cases where a test may fail and leave unprocessed hits in the database.
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: