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

test: fix datastore integration tests #3317

Merged
merged 3 commits into from
Oct 20, 2023
Merged

Conversation

atierian
Copy link
Member

@atierian atierian commented Oct 20, 2023

Description

A few DataStore integration tests were consistently failing after moving away from AsyncExpectation / await wait(for:) to XCTestExpectation / await fulfillment(of:) in #3305

These failures were caused by double waits on a single expectation.

  • Removes double wait in two remaining cases.

Another test was somewhat consistently failing due to a timeout. The test takes almost 10 seconds to run on my M1 Pro, so there's little chance it's going to make it before timing out in our CI.

  • Increases timeout from 10 to 60 seconds.

General Checklist

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • All integration tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
  • If breaking change, documentation/changelog update with migration instructions

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

@atierian
Copy link
Member Author

I ran the integration tests on this branch before opening the PR, so they're not visible from the PR itself.
Here they are:

@atierian atierian marked this pull request as ready for review October 20, 2023 19:14
@atierian atierian requested a review from a team as a code owner October 20, 2023 19:14
@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2023

Codecov Report

Merging #3317 (2d57a0e) into main (bdc9b4a) will decrease coverage by 0.20%.
The diff coverage is n/a.

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

@@            Coverage Diff             @@
##             main    #3317      +/-   ##
==========================================
- Coverage   64.49%   64.30%   -0.20%     
==========================================
  Files        1075     1075              
  Lines       35891    35891              
==========================================
- Hits        23148    23078      -70     
- Misses      12743    12813      +70     
Flag Coverage Δ
API_plugin_unit_test 67.07% <ø> (ø)
AWSPluginsCore 66.15% <ø> (ø)
Amplify 47.81% <ø> (-0.02%) ⬇️
Analytics_plugin_unit_test 81.37% <ø> (ø)
Auth_plugin_unit_test 74.09% <ø> (-0.01%) ⬇️
CoreMLPredictions_plugin_unit_test 59.44% <ø> (ø)
DataStore_plugin_unit_test 80.02% <ø> (-1.05%) ⬇️
Geo_plugin_unit_test 70.75% <ø> (ø)
Logging_plugin_unit_test 63.09% <ø> (ø)
Predictions_plugin_unit_test 37.29% <ø> (ø)
PushNotifications_plugin_unit_test 60.29% <ø> (ø)
Storage_plugin_unit_test 54.18% <ø> (ø)
unit_tests 64.30% <ø> (-0.20%) ⬇️

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

see 10 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@atierian atierian temporarily deployed to IntegrationTest October 20, 2023 19:29 — with GitHub Actions Inactive
@atierian atierian temporarily deployed to IntegrationTest October 20, 2023 19:29 — with GitHub Actions Inactive
@atierian atierian temporarily deployed to IntegrationTest October 20, 2023 19:53 — with GitHub Actions Inactive
@atierian atierian temporarily deployed to IntegrationTest October 20, 2023 19:53 — with GitHub Actions Inactive
@atierian atierian temporarily deployed to Fortify October 20, 2023 20:18 — with GitHub Actions Inactive
@atierian atierian temporarily deployed to IntegrationTest October 20, 2023 20:24 — with GitHub Actions Inactive
@atierian atierian temporarily deployed to IntegrationTest October 20, 2023 20:24 — with GitHub Actions Inactive
@atierian atierian temporarily deployed to IntegrationTest October 20, 2023 20:44 — with GitHub Actions Inactive
@atierian atierian temporarily deployed to IntegrationTest October 20, 2023 20:44 — with GitHub Actions Inactive
@atierian atierian temporarily deployed to IntegrationTest October 20, 2023 20:44 — with GitHub Actions Inactive
@atierian atierian merged commit 99f66d3 into main Oct 20, 2023
79 checks passed
@atierian atierian deleted the datastore-integration-tests branch October 20, 2023 21:19
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.

3 participants