amplify-android icon indicating copy to clipboard operation
amplify-android copied to clipboard

chore: Fix DataStore Tests

Open tylerjroach opened this issue 1 year ago • 1 comments

  • [ ] PR title and description conform to Pull Request guidelines.

Issue #, if available:

Description of changes:

We had a few inconsistent tests that were only waiting on 1 hub event, because it was not known if 2 rapid mutations to an item would end up batched when syncing, or come 1 at a time. Rather than just waiting on 1 hub event now, some of the checks have been updated to look for the last expected item in a returned hub event.

The AndroidX Orchestrator has also been added to compartmentalize tests. running on a local machine. DeviceFarm still uses its own per class orchestrator, but this change allows all tests to pass locally while running as a full suite.

How did you test these changes? (Please add a line here how the changes were tested)

Documentation update required?

  • [ ] No
  • [ ] Yes (Please include a PR link for the documentation update)

General Checklist

  • [ ] Added Unit Tests
  • [ ] Added Integration Tests
  • [ ] Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

tylerjroach avatar Nov 08 '23 14:11 tylerjroach

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (e102c2b) 41.80% compared to head (682f706) 41.79%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2625      +/-   ##
==========================================
- Coverage   41.80%   41.79%   -0.02%     
==========================================
  Files         903      903              
  Lines       28887    28887              
  Branches     4113     4113              
==========================================
- Hits        12076    12072       -4     
- Misses      15487    15489       +2     
- Partials     1324     1326       +2     

codecov-commenter avatar Nov 21 '23 20:11 codecov-commenter