ref(sessions): Split up sessions tests into more TestCase classes #97048
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theunhandled
state.So what this PR does is run through all the tests and co-location the
self.store_sessions()
orself.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!