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

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

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_1168

Details

  • 93 of 106 (87.74%) changed or added relevant lines in 6 files are covered.
  • 57 unchanged lines in 11 files lost coverage.
  • Overall coverage increased (+0.008%) to 90.988%

Changes Missing Coverage Covered Lines Changed/Added Lines %
test/object-store/util/test_file.cpp 59 72 81.94%
Files with Coverage Reduction New Missed Lines %
src/realm/array_string.cpp 1 87.23%
src/realm/uuid.cpp 1 98.48%
src/realm/table.hpp 2 91.84%
test/object-store/util/test_file.cpp 2 87.41%
src/realm/query_expression.hpp 3 93.81%
src/realm/sync/instruction_applier.cpp 3 68.01%
src/realm/sync/network/http.hpp 3 82.27%
src/realm/sync/noinst/server/server.cpp 3 74.29%
src/realm/sync/noinst/protocol_codec.hpp 4 73.85%
src/realm/sync/noinst/client_impl_base.cpp 11 82.22%
Totals Coverage Status
Change from base Build 2420: 0.008%
Covered Lines: 214852
Relevant Lines: 236131

💛 - 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

None yet

1 participant