From aa96927d327a2f60d826ac66f2d6afd22dbce83e Mon Sep 17 00:00:00 2001 From: Kirollos Morkos Date: Thu, 13 Apr 2023 16:06:41 -0400 Subject: [PATCH 1/2] Fix test assertion --- evergreen/config.yml | 2 +- how-to-build.md | 2 +- test/object-store/sync/flx_sync.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/evergreen/config.yml b/evergreen/config.yml index ad62d6c082d..620f67df696 100644 --- a/evergreen/config.yml +++ b/evergreen/config.yml @@ -630,7 +630,7 @@ tasks: export DEVELOPER_DIR="${xcode_developer_dir}" fi - ./evergreen/install_baas.sh -w ./baas-work-dir -b 5d5a4f470da7f84132ff97c8b56368e98ad17489 2>&1 | tee install_baas_output.log + ./evergreen/install_baas.sh -w ./baas-work-dir -b cfda5c63e6910091853d3fb1085dcf45396279bb 2>&1 | tee install_baas_output.log fi - command: shell.exec diff --git a/how-to-build.md b/how-to-build.md index 690710dbef2..fcda6529c84 100644 --- a/how-to-build.md +++ b/how-to-build.md @@ -187,7 +187,7 @@ cmake --build build.sync.ninja --target realm-object-store-tests ``` ### Developing inside a container -The `.devcontainer` folders contains configuration for the [Visual Stuio Code Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension, which allows you to develop inside the same Docker container that CI runs in, which is especially useful because it also sets up the MongoDB Realm Test Server container. Make sure you have the `Remote - Containers` extension installed (it's part of the recommended extensions list for this repository) and run the `Remote-Containers: Reopen in Container` (or `Rebuild and Reopen in Container`) command. VSCode will build the image described in `Dockerfile`, spin up a container group using Docker Compose, and reopen the workspace from inside the container. +The `.devcontainer` folders contains configuration for the [Visual Studio Code Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension, which allows you to develop inside the same Docker container that CI runs in, which is especially useful because it also sets up the MongoDB Realm Test Server container. Make sure you have the `Remote - Containers` extension installed (it's part of the recommended extensions list for this repository) and run the `Remote-Containers: Reopen in Container` (or `Rebuild and Reopen in Container`) command. VSCode will build the image described in `Dockerfile`, spin up a container group using Docker Compose, and reopen the workspace from inside the container. #### `ssh-agent` forwarding diff --git a/test/object-store/sync/flx_sync.cpp b/test/object-store/sync/flx_sync.cpp index d5f3288d27a..cf423b5a24b 100644 --- a/test/object-store/sync/flx_sync.cpp +++ b/test/object-store/sync/flx_sync.cpp @@ -1969,7 +1969,7 @@ TEST_CASE("flx: bootstrap batching prevents orphan documents", "[sync][flx][app] REQUIRE(pending_batch.query_version == 1); REQUIRE(static_cast(pending_batch.progress)); REQUIRE(pending_batch.remaining_changesets == 0); - REQUIRE(pending_batch.changesets.size() == 3); + REQUIRE(pending_batch.changesets.size() == 6); check_interrupted_state(realm); } From 5e71187d1bfce2c335290721c0217fc27f3119fd Mon Sep 17 00:00:00 2001 From: Kirollos Morkos Date: Thu, 13 Apr 2023 18:21:49 -0400 Subject: [PATCH 2/2] Remove no longer relevant test --- dependencies.list | 2 +- test/object-store/sync/flx_sync.cpp | 40 ----------------------------- 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/dependencies.list b/dependencies.list index 539e99b356b..4584b59c453 100644 --- a/dependencies.list +++ b/dependencies.list @@ -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 diff --git a/test/object-store/sync/flx_sync.cpp b/test/object-store/sync/flx_sync.cpp index cf423b5a24b..585937c5bc1 100644 --- a/test/object-store/sync/flx_sync.cpp +++ b/test/object-store/sync/flx_sync.cpp @@ -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 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(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(); - target.sync_config->error_handler = [promise = util::CopyablePromiseHolder(std::move(error_pf.promise))]( - std::shared_ptr, 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