From 4cefac0f7e142082a1dbe4913c19fec702dac6c3 Mon Sep 17 00:00:00 2001 From: Jonathan Reams Date: Mon, 23 May 2022 12:32:39 -0400 Subject: [PATCH] changelog and fix test hang --- CHANGELOG.md | 1 + test/object-store/sync/flx_sync.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28d27dd7dcd..7c34f04075b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * In RQL 'NONE x BETWEEN ...' and 'ANY x BETWEEN ...' had incorrect behavior, so it is now disallowed ([#5508](https://github.com/realm/realm-core/issues/5508), since v11.3.0) * `SyncManager::path_for_realm` now allows custom file names for Flexible Sync enabled Realms. (Issue [#5473](https://github.com/realm/realm-core/issues/5473)). * Fix ignoring ordering for queries passed into sync subscriptions in the C API. (Issue [#5504](https://github.com/realm/realm-core/issues/5504)). +* FLX sync will now ensure that a bootstrap from the server will only be applied if the entire bootstrap is received - ensuring there are no orphaned objects as a result of changing the read snapshot on the server ([#5331](https://github.com/realm/realm-core/pull/5331)) ### Breaking changes * None. diff --git a/test/object-store/sync/flx_sync.cpp b/test/object-store/sync/flx_sync.cpp index e943d50b8ed..43bccf0e49c 100644 --- a/test/object-store/sync/flx_sync.cpp +++ b/test/object-store/sync/flx_sync.cpp @@ -22,6 +22,7 @@ #include "flx_sync_harness.hpp" #include "realm/object-store/impl/object_accessor_impl.hpp" +#include "realm/object-store/impl/realm_coordinator.hpp" #include "realm/object-store/schema.hpp" #include "realm/object-store/sync/generic_network_transport.hpp" #include "realm/object-store/sync/sync_session.hpp" @@ -358,8 +359,12 @@ TEST_CASE("flx: interrupted bootstrap restarts/recovers on reconnect", "[sync][f } interrupted.get(); + realm->sync_session()->shutdown_and_wait(); + realm->close(); } + _impl::RealmCoordinator::clear_all_caches(); + { auto realm = DB::create(sync::make_client_replication(), interrupted_realm_config.path); auto sub_store = sync::SubscriptionStore::create(realm, [](int64_t) {});