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

RNET-1126: Fix flaky tests on CI #3595

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

RNET-1126: Fix flaky tests on CI #3595

wants to merge 6 commits into from

Conversation

papafe
Copy link
Contributor

@papafe papafe commented May 3, 2024

Fixes #3560

@cla-bot cla-bot bot added the cla: yes label May 3, 2024
@papafe papafe added the no-changelog Used to skip the changelog check label May 3, 2024
Copy link

coveralls-official bot commented May 3, 2024

Pull Request Test Coverage Report for Build 9594797197

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 112 unchanged lines in 17 files lost coverage.
  • Overall coverage decreased (-1.3%) to 78.817%

Files with Coverage Reduction New Missed Lines %
Realm/Realm/Dynamic/MetaRealmObject.cs 1 56.55%
Realm/Realm/Dynamic/DynamicAsymmetricObject.cs 1 0.0%
Realm/Realm/DatabaseTypes/RealmCollectionBase.cs 1 83.98%
Realm/Realm/Handles/ObjectHandle.cs 1 90.61%
Realm/Realm/Configurations/RealmConfigurationBase.cs 1 95.35%
Realm/Realm/Dynamic/DynamicRealmObjectHelper.cs 2 68.42%
Realm/Realm/Configurations/FlexibleSyncConfiguration.cs 2 92.54%
Realm/Realm/Exceptions/Sync/SubscriptionException.cs 2 0.0%
Realm/Realm/Helpers/SerializationHelper.cs 3 52.42%
Realm/Realm/Handles/SessionHandle.cs 5 81.97%
Totals Coverage Status
Change from base Build 8937828998: -1.3%
Covered Lines: 6617
Relevant Lines: 8241

💛 - Coveralls

@papafe
Copy link
Contributor Author

papafe commented May 8, 2024

The cause of the flakyness seems to be due to some various timing issues:

  • Reusing the same object for different tests led to realm exceptions when adding an object with the same primary key
  • When objects are added directly to Atlas, the synchronization of objects does not respect the boundaries of changesets, that can be broken down in smaller pieces (especially when working with links). This means that sometimes the elements of collections of links are not added all together, and this did not work with our expectations. This is the reason I've added much more WaitForConditions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes no-changelog Used to skip the changelog check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix flaky static queries tests
1 participant