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

RCORE-2151 Fix race in schema migration tests #7766

Merged
merged 1 commit into from
Jun 3, 2024
Merged

Conversation

danieltabacaru
Copy link
Collaborator

@danieltabacaru danieltabacaru commented Jun 1, 2024

What, How & Why?

Some of the schema migration tests test the recovery of subscriptions and objects after a schema migration. This requires that the subscriptions and objects are committed when the synchronization session is paused so nothing is uploaded. SyncSession::pause() is used for this, but pause is an async operation so there is a race between pausing the session and uploading the data and subscriptions. SyncSession::shutdown_and_wait() is used instead.

Fixes #7767.

☑️ ToDos

  • [ ] 📝 Changelog update
  • 🚦 Tests (or not relevant)
  • [ ] C-API, if public C++ API changed
  • [ ] bindgen/spec.yml, if public C++ API changed

@cla-bot cla-bot bot added the cla: yes label Jun 1, 2024
@danieltabacaru danieltabacaru changed the title Fix race in schema migration tests RCORE-2151 Fix race in schema migration tests Jun 1, 2024
Copy link

Pull Request Test Coverage Report for Build daniel.tabacaru_839

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • 52 unchanged lines in 10 files lost coverage.
  • Overall coverage decreased (-0.001%) to 90.825%

Files with Coverage Reduction New Missed Lines %
src/realm/util/file.cpp 1 78.73%
test/test_query2.cpp 1 98.73%
src/realm/cluster.cpp 2 75.6%
src/realm/sync/network/http.hpp 2 82.76%
src/realm/table_view.cpp 2 92.99%
src/realm/sync/noinst/server/server.cpp 3 73.93%
src/realm/alloc_slab.cpp 4 90.81%
src/realm/sync/noinst/client_impl_base.cpp 4 82.92%
src/realm/sync/network/network.hpp 7 85.28%
test/fuzz_group.cpp 26 43.38%
Totals Coverage Status
Change from base Build 2370: -0.001%
Covered Lines: 214573
Relevant Lines: 236250

💛 - Coveralls

@danieltabacaru danieltabacaru marked this pull request as ready for review June 3, 2024 11:54
@danieltabacaru danieltabacaru merged commit 352b981 into master Jun 3, 2024
50 checks passed
@danieltabacaru danieltabacaru deleted the dt/fix_race branch June 3, 2024 12:53
@github-actions github-actions bot mentioned this pull request Jun 7, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix race in schema migration tests
2 participants