-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
shutdown: Destroy kernel last, make test shutdown order consistent #28224
shutdown: Destroy kernel last, make test shutdown order consistent #28224
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK 960112d
Are you still working on this? |
Yes. |
I think there is an outstanding comment: #28224 (comment) ? |
960112d
to
99a668c
Compare
Updated 960112d -> 99a668c (testSetupDestructorOrder_0 -> testSetupDestructorOrder_1, compare)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK 99a668c
Changes look good, but I would suggest changing the PR title to something like: "shutdown: destroy kernel last and make test shutdown order consistent" because the current title "tests: Reset node context members on ~ChainTestingSetup" makes it seems like this is a test-only change.
Also think it would be better to split changes in init.cpp
and setup_common.cpp
into separate commits. The changes are both related to shutdown but they have different rationales and effects, so it doesn't really make sense for them to be in the same commit.
Currently the shutdown function resets the kernel before the chainman and scheduler. Invert this order by resetting the kernel last, since they might rely on the kernel.
The destruction/resetting of node context members in the tests should roughly follow the behaviour of the Shutdown function in `init.cpp`.
99a668c
to
c1144f0
Compare
Updated 99a668c -> c1144f0 (testSetupDestructorOrder_1 -> testSetupDestructorOrder_2, compare)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK c1144f0. No code changes since last review, just updated commits and descriptions
ACK c1144f0 🗣 Show signatureSignature:
|
ACK c1144f0 |
The destruction/resetting of node context members in the tests should roughly follow the behavior of the
Shutdown
function ininit.cpp
.This was originally requested by MarcoFalke in this comment in response to the original pull request introducing the
kernel::Context
.