Skip to content
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

Add sync integration test for in-memory mode #5955

Merged
merged 4 commits into from
Oct 21, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions test/object-store/sync/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2063,6 +2063,31 @@ TEST_CASE("app: sync integration", "[sync][app]") {
}
}

SECTION("MemOnly durability") {
{
SyncTestFile config(app, partition, schema);
config.in_memory = true;

REQUIRE(config.options().durability == DBOptions::Durability::MemOnly);
auto r = Realm::get_shared_realm(config);

REQUIRE(get_dogs(r).size() == 0);
create_one_dog(r);
REQUIRE(get_dogs(r).size() == 1);
}

{
create_user_and_log_in(app);
SyncTestFile config(app, partition, schema);
config.in_memory = true;
auto r = Realm::get_shared_realm(config);
Results dogs = get_dogs(r);
REQUIRE(dogs.size() == 1);
REQUIRE(dogs.get(0).get<String>("breed") == "bulldog");
REQUIRE(dogs.get(0).get<String>("name") == "fido");
}
}

// MARK: Expired Session Refresh -
SECTION("Invalid Access Token is Refreshed") {
{
Expand Down