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

Integration Tests: improve flaky tests #3584

Closed
wants to merge 2 commits into from
Closed

Conversation

NachoSoto
Copy link
Contributor

@NachoSoto NachoSoto commented Jan 17, 2024

Fixes https://app.circleci.com/pipelines/github/RevenueCat/purchases-ios/17208/workflows/729d01a6-d644-446c-8514-80b54177ff43/jobs/162052/tests
With #3140 and faster executors in CI, it's become clear that this test is very flaky because it relies on requests not finishing quickly enough.

For the first test, the new implementation ensures that all customerInfo calls happen in parallel.
For the second test, it's important that if the first CustomerInfo request had finished, we don't make a second one, which would make the test fail.

Fixes https://app.circleci.com/pipelines/github/RevenueCat/purchases-ios/17208/workflows/729d01a6-d644-446c-8514-80b54177ff43/jobs/162052/tests
With #3140 and faster executors in CI, it's become clear that this test is very flaky because it relies on requests not finishing quickly enough.

For the first test, specifying a priority should ensure that tasks don't start running until they're all enqueued.
For the second test, it's important that if the first `CustomerInfo` request had finished, we don't make a second one, which would make the test fail.
@NachoSoto NachoSoto added the test label Jan 17, 2024
@NachoSoto NachoSoto requested a review from a team January 17, 2024 23:00
Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a6774fa) 86.10% compared to head (d8498da) 86.10%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3584      +/-   ##
==========================================
- Coverage   86.10%   86.10%   -0.01%     
==========================================
  Files         242      242              
  Lines       17629    17629              
==========================================
- Hits        15180    15179       -1     
- Misses       2449     2450       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@NachoSoto
Copy link
Contributor Author

Included in #3140

@NachoSoto NachoSoto closed this Jan 18, 2024
@NachoSoto NachoSoto deleted the integration-tests-flaky branch January 18, 2024 00:04
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.

1 participant