Skip to content

ref(sessions): Split up sessions tests into more TestCase classes #97048

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

Merged
merged 3 commits into from
Aug 4, 2025

Conversation

ryan953
Copy link
Member

@ryan953 ryan953 commented Aug 2, 2025

The problem is that many of these tests share the same set of session data to assert against and in a followup I'm going to split many of these tests into two parts, one to test crashed state (as we do now) and another set that will run through the unhandled state.

So what this PR does is run through all the tests and co-location the self.store_sessions() or self.bulk_store_sessions() calls into the test that needs it. Some tests don't even need those mocks and speedup just a little tiny bit.
As i was going through i tried to isolate things that were not re-used across tests or testcases, and improve names when i could.

Now what we have is a base class ReleaseHealthBaseTestCase which is a place to hold collections of re-usable session mocks. Right now there are two scenarios in there with some number of crashes. Soon to be more!

@ryan953 ryan953 requested review from cmanallen and a team August 2, 2025 00:48
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 2, 2025
cursor[bot]

This comment was marked as outdated.

Copy link

codecov bot commented Aug 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #97048       +/-   ##
===========================================
+ Coverage   69.06%   80.68%   +11.61%     
===========================================
  Files        8516     8523        +7     
  Lines      374209   374554      +345     
  Branches    24334    24334               
===========================================
+ Hits       258442   302193    +43751     
+ Misses     115391    71985    -43406     
  Partials      376      376               

@ryan953 ryan953 merged commit 3777940 into master Aug 4, 2025
62 checks passed
@ryan953 ryan953 deleted the ryan953/ref-sessions-test branch August 4, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants