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

Replace TestAppSession close()/reopen() with scope based TestAppSession instance #7672

Merged
merged 22 commits into from
Aug 12, 2024

Conversation

michael-wb
Copy link
Contributor

@michael-wb michael-wb commented May 2, 2024

What, How & Why?

The TestAppSession object for tracking an App/SyncManager and an AppSession was updated in PR #7528 to allow the App instance to be restarted without recreating or logging in a user to allow testing the situation where a SyncSession with a cached user tries to communicate with the server before updating the location. It was recommended in that PR's review comments to update the TestAppSession close() and reopen() functions with more of a scope-based close and open mechanism.

This PR updates this object to remove the close()/reopen() functions and adds a Config structure that is passed to the TestAppSession for configuring the app session.

☑️ ToDos

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

@michael-wb michael-wb added the no-jira-ticket Skip checking the PR title for Jira reference label May 2, 2024
@michael-wb michael-wb self-assigned this May 2, 2024
@cla-bot cla-bot bot added the cla: yes label May 2, 2024
Copy link

coveralls-official bot commented May 3, 2024

Pull Request Test Coverage Report for Build michael.wilkersonbarker_1324

Details

  • 98 of 111 (88.29%) changed or added relevant lines in 6 files are covered.
  • 53 unchanged lines in 10 files lost coverage.
  • Overall coverage increased (+0.003%) to 91.089%

Changes Missing Coverage Covered Lines Changed/Added Lines %
test/object-store/util/test_file.cpp 61 74 82.43%
Files with Coverage Reduction New Missed Lines %
src/realm/uuid.cpp 1 98.48%
test/fuzz_tester.hpp 1 57.73%
test/test_index_string.cpp 1 93.48%
src/realm/mixed.cpp 3 86.46%
src/realm/sync/noinst/protocol_codec.hpp 3 76.27%
test/object-store/util/test_file.cpp 4 87.06%
src/realm/cluster_tree.cpp 7 89.37%
test/sync_fixtures.hpp 7 73.44%
src/realm/sync/noinst/server/server.cpp 11 73.65%
test/fuzz_group.cpp 15 40.99%
Totals Coverage Status
Change from base Build 2557: 0.003%
Covered Lines: 217337
Relevant Lines: 238598

💛 - Coveralls

@michael-wb michael-wb marked this pull request as draft May 30, 2024 14:47
@michael-wb michael-wb changed the title Update TestAppSession to take a config object and be restarted Replace TestAppSession close()/reopen() with scope based TestAppSession instance May 30, 2024
@michael-wb michael-wb marked this pull request as ready for review May 30, 2024 18:49
@michael-wb michael-wb requested a review from jbreams May 30, 2024 19:30
@michael-wb michael-wb merged commit bd17af2 into master Aug 12, 2024
45 checks passed
@michael-wb michael-wb deleted the mwb/fix-test-app-session branch August 12, 2024 12:30
@github-actions github-actions bot mentioned this pull request Aug 30, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes no-jira-ticket Skip checking the PR title for Jira reference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants