Skip to content

Commit

Permalink
Remove no longer relevant test
Browse files Browse the repository at this point in the history
  • Loading branch information
kmorkos committed Apr 13, 2023
1 parent aa96927 commit 5e71187
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 41 deletions.
2 changes: 1 addition & 1 deletion dependencies.list
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ PACKAGE_NAME=realm-core
VERSION=13.9.0
OPENSSL_VERSION=3.0.8
WIN32_ZLIB_VERSION=1.2.13
MDBREALM_TEST_SERVER_TAG=2023-03-16
MDBREALM_TEST_SERVER_TAG=2023-04-13
40 changes: 0 additions & 40 deletions test/object-store/sync/flx_sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2946,46 +2946,6 @@ TEST_CASE("flx: bootstrap changesets are applied continuously", "[sync][flx][app
}


TEST_CASE("flx: really big bootstraps", "[sync][flx][app]") {
FLXSyncTestHarness harness("harness");

std::vector<ObjectId> expected_obj_ids;
harness.load_initial_data([&](SharedRealm realm) {
realm->cancel_transaction();
for (size_t n = 0; n < 10; ++n) {
realm->begin_transaction();
for (size_t i = 0; i < 100; ++i) {
expected_obj_ids.push_back(ObjectId::gen());
auto& obj_id = expected_obj_ids.back();
CppContext c(realm);
Object::create(c, realm, "TopLevel",
std::any(AnyDict{{"_id", obj_id},
{"queryable_str_field", "foo"s},
{"queryable_int_field", static_cast<int64_t>(5)},
{"non_queryable_field", random_string(1024 * 128)}}));
}
realm->commit_transaction();
}
realm->begin_transaction();
});

SyncTestFile target(harness.app()->current_user(), harness.schema(), SyncConfig::FLXSyncEnabled{});
auto error_pf = util::make_promise_future<SyncError>();
target.sync_config->error_handler = [promise = util::CopyablePromiseHolder(std::move(error_pf.promise))](
std::shared_ptr<SyncSession>, SyncError err) mutable {
promise.get_promise().emplace_value(std::move(err));
};
auto realm = Realm::get_shared_realm(target);
auto mut_subs = realm->get_latest_subscription_set().make_mutable_copy();
mut_subs.insert_or_assign(Query(realm->read_group().get_table("class_TopLevel")));
auto subs = mut_subs.commit();

// TODO when BAAS-19105 is fixed we should be able to just wait for bootstrapping to be complete. For now though,
// check that we get the error code we expect.
auto err = error_pf.future.get();
REQUIRE(err.get_system_error() == sync::ClientError::bad_changeset_size);
}

} // namespace realm::app

#endif // REALM_ENABLE_AUTH_TESTS

0 comments on commit 5e71187

Please sign in to comment.