-
Notifications
You must be signed in to change notification settings - Fork 741
Replace shutdownEnvironment
with t.Cleanup()
#2491
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
Conversation
t.Cleanup()
shutdownEnvironment
with t.Cleanup()
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.
I'd suggest to move these changes after we cleaned up the UTs framework.
As you know there is quite some code duplication currently and a few PRs have been open for a few months now to address this. You can find them in #2453. You know I welcome your review on those.
Merging these PRs will result in a larger reduction of LOC than any ad-hoc attempt like this one. It would also definitely reduce the work needed to maintain those PRs up to date
Where does this PR overlap with the UT framework PRs? I'd be happy to update those PRs if that unblocks this minor cleanup PR (or minimize the diff here if it reduces conflicts) |
It's not so much the effort of rebasing the PRs in #2453, but to do it daily in order to keep them up to date. Same actually applies to all the outstanding P-chain PRs.
I am suggesting to prioritize these PRs by impact and to merge PRs in #2453 before this ones |
shutdownEnvironment
with t.Cleanup()
shutdownEnvironment
with t.Cleanup
shutdownEnvironment
with t.Cleanup
shutdownEnvironment
with t.Cleanup()
Why this should be merged
We currently require consumers of
newEnvironment
to callshutdownEnvironment
. We can uset.Cleanup()
to do this more robustly and save on LoC.How this works
Deletes
shutdownEnvironment
and moves it to at.Cleanup
callHow this was tested
CI