-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
chore - disposable tracker can differentiate between weak and strong leak #239322
base: main
Are you sure you want to change the base?
Conversation
Oh still failing too |
I know... There is plenty of bogous tests. Throwing the towel, it's not feasible. @hediet @connor4312 I believe there is something fundamentally wrong with I am drafting this PR and give it to you, maybe there is something clever that can be done. Otherwise it isn't worth the effort and every leak is a bad leak |
This was always been how it's worked and was known to at least some people. Anything created before you call ensure will not be tracked, sometimes I think this was beneficial to people in adopting it since you could stick the ensure call after setup and not need to deal with making sure just test setup code was not being leaked (eg. store.add on a bunch of services). I can't remember if it was called it out, but I assumed it was known by most since they explicitly put the call after all the tests which is a weird place to put it for no reason. If we want to "fix" this, I think we'd need another team-wide debt task with an eslint rule that forces the ensure call to be the first call inside vscode/src/vs/workbench/contrib/terminal/test/browser/terminalInstance.test.ts Lines 120 to 121 in 521e898
For the case where you want a teardown to run before leaked disposables are detected you could then use For the case you mentioned specifically, can't you just change that line to
|
No description provided.