-
Notifications
You must be signed in to change notification settings - Fork 163
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -542,7 +542,7 @@ public void RealmObjectAPI_Links_AtlasToRealm(TestCaseData<LinksObject> testCase | |
var linkObjs = await realm.All<LinksObject>().SubscribeAsync(); | ||
|
||
await realm.SyncSession.WaitForDownloadAsync(); | ||
await linkObjs.WaitForEventAsync((sender, _) => sender.Count >= totalCount); | ||
await linkObjs.WaitForEventAsync((sender, _) => sender.Count >= totalCount && realm.Find<LinksObject>(obj.Id) != null); | ||
|
||
var linkObj = realm.Find<LinksObject>(obj.Id); | ||
|
||
|
@@ -752,7 +752,7 @@ public void RealmObjectAPI_RealmValueLinks_AtlasToRealm(TestCaseData<RealmValueO | |
var realmObjs = await realm.All<RealmValueObject>().SubscribeAsync(); | ||
|
||
await intObjs.WaitForEventAsync((sender, _) => sender.Count >= totalCount); | ||
await realmObjs.WaitForEventAsync((sender, _) => sender.Count >= 1); | ||
await realmObjs.WaitForEventAsync((sender, _) => sender.Count == 1 && realm.Find<RealmValueObject>(obj.Id) != null); | ||
|
||
var realmValObj = realm.Find<RealmValueObject>(obj.Id); | ||
|
||
|
@@ -1257,7 +1257,7 @@ public void RealmObjectAPI_MissingField_GetsDefaultValueWhenDeserialized() | |
|
||
SyncConfigurationBase config = appConfigType == AppConfigType.FlexibleSync ? GetFLXIntegrationConfig(user) : GetIntegrationConfig(user); | ||
|
||
using var realm = await GetRealmAsync(config); | ||
using var realm = await GetRealmAsync(config, true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
var client = user.GetMongoClient(ServiceName); | ||
var collection = client.GetCollection<T>(); | ||
await collection.DeleteManyAsync(new object()); | ||
|
@@ -1272,7 +1272,7 @@ public void RealmObjectAPI_MissingField_GetsDefaultValueWhenDeserialized() | |
|
||
SyncConfigurationBase config = appConfigType == AppConfigType.FlexibleSync ? GetFLXIntegrationConfig(user) : GetIntegrationConfig(user); | ||
|
||
using var realm = await GetRealmAsync(config); | ||
using var realm = await GetRealmAsync(config, true); | ||
var client = user.GetMongoClient(ServiceName); | ||
var db = client.GetDatabase(SyncTestHelpers.SyncMongoDBName(appConfigType)); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1166,11 +1166,11 @@ public void UserCustomDataChange_RaisesChanged() | |
|
||
await tcs.Task; | ||
|
||
tcs = new(); | ||
|
||
// Unsubscribe and verify that it no longer raises user changed | ||
user.Changed -= OnUserChanged; | ||
|
||
tcs = new(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sometimes no |
||
|
||
var filter = BsonDocument.Parse(@"{ | ||
user_id: { $eq: """ + user.Id + @""" } | ||
}"); | ||
|
There was a problem hiding this comment.
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