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

Fix various failing CI tests #3535

Merged
merged 6 commits into from
Feb 26, 2024
Merged

Fix various failing CI tests #3535

merged 6 commits into from
Feb 26, 2024

Conversation

papafe
Copy link
Contributor

@papafe papafe commented Feb 23, 2024

Fixes #3526

@papafe papafe added the no-changelog Used to skip the changelog check label Feb 23, 2024
@cla-bot cla-bot bot added the cla: yes label Feb 23, 2024
@@ -1328,7 +1328,7 @@ public void Session_WaitForUpload_CanBeCancelled()

sw.Stop();

Assert.That(sw.ElapsedMilliseconds, Is.LessThan(5));
Copy link
Contributor Author

@papafe papafe Feb 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even locally these two tests didn't pass all the time

@@ -1257,7 +1257,7 @@ private async Task<MongoClient.Collection<T>> GetCollection<T>(string appConfigT

SyncConfigurationBase config = appConfigType == AppConfigType.FlexibleSync ? GetFLXIntegrationConfig(user) : GetIntegrationConfig(user);

using var realm = await GetRealmAsync(config);
using var realm = await GetRealmAsync(config, true);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to wait for the schema to be synchronized, otherwise the call to the backends without the database name could raise an exception

// Unsubscribe and verify that it no longer raises user changed
user.Changed -= OnUserChanged;

tcs = new();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes no TimeoutException was raised at the end of the method on CI. I verified that actually we get two Changed notifications, one for the custom data, and one for the user token refresh.
I suspect that sometimes the second notification was being raised after the new token completion source was created but before the unsubscription, that's why the timeout had no effect.

Copy link

coveralls-official bot commented Feb 23, 2024

Pull Request Test Coverage Report for Build 8021119280

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 510 unchanged lines in 28 files lost coverage.
  • Overall coverage increased (+0.1%) to 81.034%

Files with Coverage Reduction New Missed Lines %
Realm/Realm/Sync/ErrorHandling/DiscardUnsyncedChangesHandler.cs 1 60.0%
Realm/Realm/Sync/ErrorHandling/RecoverUnsyncedChangesHandler.cs 1 60.0%
Realm/Realm/Native/HttpClientTransport.cs 2 64.0%
Realm/Realm/Helpers/SerializationHelper.cs 3 52.79%
Realm/Realm/Sync/Credentials.cs 3 64.52%
Realm/Realm/Sync/UserIdentity.cs 3 28.57%
Realm/Realm/Extensions/TestingExtensions.cs 4 0.0%
Realm/Realm/Native/UserApiKey.cs 4 33.33%
Realm/Realm/Sync/ErrorHandling/ManualRecoveryHandler.cs 4 0.0%
Realm/Realm/Configurations/SyncConfigurationBase.cs 5 89.36%
Totals Coverage Status
Change from base Build 8003936800: 0.1%
Covered Lines: 6676
Relevant Lines: 8093

💛 - Coveralls

@papafe papafe merged commit cc1a1ef into main Feb 26, 2024
66 of 67 checks passed
@papafe papafe deleted the fp/fix-ci-mixed branch February 26, 2024 11:07
nirinchev added a commit that referenced this pull request Feb 27, 2024
* main:
  Fix various failing CI tests (#3535)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes no-changelog Used to skip the changelog check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate flaky tests
2 participants