Skip to content

Commit

Permalink
Fix race in test
Browse files Browse the repository at this point in the history
  • Loading branch information
danieltabacaru committed Oct 30, 2023
1 parent 848b672 commit 0181c0a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/object-store/sync/flx_sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4428,11 +4428,12 @@ TEST_CASE("flx: fatal errors and session becoming inactive cancel pending waits"
realm->sync_session()->wait_for_upload_completion([promise = std::move(download_complete_promise)](auto) mutable {
promise.emplace_value();
});
subs = create_subscription(realm);
subs_future = subs.get_state_change_notification(sync::SubscriptionSet::State::Complete);
schema[0].persisted_properties.push_back({"other_col", PropertyType::Int | PropertyType::Nullable});
realm->update_schema(schema);

subs = create_subscription(realm);
subs_future = subs.get_state_change_notification(sync::SubscriptionSet::State::Complete);

harness.load_initial_data([&](SharedRealm realm) {
CppContext c(realm);
Object::create(c, realm, "TopLevel",
Expand Down

0 comments on commit 0181c0a

Please sign in to comment.