Skip to content

Commit 82a17a4

Browse files
committed
Fix a race condition in a test
1 parent 19d40bb commit 82a17a4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/test_sync.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6544,8 +6544,6 @@ TEST(Sync_BundledRealmFile)
65446544
fixtures::ClientServerFixture fixture{dir, test_context};
65456545
fixture.start();
65466546

6547-
Session session = fixture.make_bound_session(db);
6548-
65496547
write_transaction(db, [](WriteTransaction& tr) {
65506548
auto foos = tr.get_group().add_table_with_primary_key("class_Foo", type_Int, "id");
65516549
foos->create_object_with_primary_key(123);
@@ -6554,6 +6552,7 @@ TEST(Sync_BundledRealmFile)
65546552
// We cannot write out file if changes are not synced to server
65556553
CHECK_THROW_ANY(db->write_copy(path.c_str(), nullptr));
65566554

6555+
Session session = fixture.make_bound_session(db);
65576556
session.wait_for_upload_complete_or_client_stopped();
65586557
session.wait_for_download_complete_or_client_stopped();
65596558

0 commit comments

Comments
 (0)