Skip to content

Close hit queue on Edge unregistration#27

Merged
emdobrin merged 4 commits intoadobe:dev-v2.0.0from
kevinlind:fix-fun-tests
Jan 18, 2023
Merged

Close hit queue on Edge unregistration#27
emdobrin merged 4 commits intoadobe:dev-v2.0.0from
kevinlind:fix-fun-tests

Conversation

@kevinlind
Copy link
Copy Markdown
Contributor

Description

Close the hit queue on Edge extension onUnregister handler 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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

For restart tests, reset the ServiceProvider to create new instance of DataQueue. Clear database after functional tests.
@kevinlind kevinlind requested a review from emdobrin January 18, 2023 06:14
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 18, 2023

Codecov Report

Merging #27 (f86ede4) into dev-v2.0.0 (29b3c0c) will increase coverage by 3.79%.
The diff coverage is 100.00%.

@@               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     
Flag Coverage Δ
functional-tests 66.15% <100.00%> (?)
unit-tests 79.22% <0.00%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...java/com/adobe/marketing/mobile/EdgeExtension.java 85.26% <100.00%> (+10.09%) ⬆️
...adobe/marketing/mobile/NetworkResponseHandler.java 82.14% <0.00%> (+2.23%) ⬆️
...va/com/adobe/marketing/mobile/ExperienceEvent.java 80.49% <0.00%> (+2.44%) ⬆️
.../marketing/mobile/StoreResponsePayloadManager.java 77.27% <0.00%> (+3.03%) ⬆️
...ain/java/com/adobe/marketing/mobile/EdgeState.java 98.41% <0.00%> (+3.17%) ⬆️
...a/com/adobe/marketing/mobile/EdgeHitProcessor.java 81.82% <0.00%> (+4.55%) ⬆️
...in/java/com/adobe/marketing/mobile/EventUtils.java 87.50% <0.00%> (+6.25%) ⬆️
...java/com/adobe/marketing/mobile/ConsentStatus.java 91.30% <0.00%> (+8.70%) ⬆️
...com/adobe/marketing/mobile/EdgeNetworkService.java 73.40% <0.00%> (+9.04%) ⬆️
... and 1 more

@emdobrin emdobrin merged commit 31fe7e6 into adobe:dev-v2.0.0 Jan 18, 2023
@kevinlind kevinlind deleted the fix-fun-tests branch January 18, 2023 22:42
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