Skip to content

Adopt ensureNoDisposablesAreLeakedInTestSuite round 2 #200091

Closed
@connor4312

Description

@connor4312

This is round two of #190503, with slightly updated instructions:

  1. New: remove the file(s) you want to fix from the code-ensure-no-disposables-leak-in-test exclusions in .eslintrc.json.
  2. You will get lint warnings about the suites where the function call is missing. Add it, using the instructions in Adopt ensureNoDisposablesAreLeakedInTestSuite in unit tests #190503
  3. Run tests in the file (Cmd/Ctrl+; F) and commit the change when they pass.

Note that the function now conveniently returns a DisposableStore for you to use, and you'll be pleased to see that reporting of undisposed resources in-editor have been dramatically improved since the first issue was created. In simple cases where tests already clean up nicely, you should be able to add the function call and move on 🙂

Files lacking the call, based on the last person who touched them:

  • @TylerLeonhardt
  • 🤷
    • src/vs/editor/contrib/folding/test/browser/indentRangeProvider.test.ts
    • src/vs/platform/configuration/test/common/configuration.test.ts
    • src/vs/platform/extensions/test/common/extensionValidator.test.ts
    • src/vs/platform/opener/test/common/opener.test.ts
    • src/vs/platform/registry/test/common/platform.test.ts
    • src/vs/platform/telemetry/test/browser/1dsAppender.test.ts
    • src/vs/platform/workspace/test/common/workspace.test.ts
    • src/vs/workbench/contrib/extensions/test/common/extensionQuery.test.ts
    • src/vs/workbench/contrib/tasks/test/common/problemMatcher.test.ts
    • src/vs/workbench/services/commands/test/common/commandService.test.ts
  • @alexr00
    • src/vs/workbench/api/test/browser/mainThreadConfiguration.test.ts
    • src/vs/workbench/api/test/node/extHostTunnelService.test.ts
    • src/vs/workbench/contrib/tasks/test/common/taskConfiguration.test.ts
    • src/vs/workbench/services/search/test/browser/queryBuilder.test.ts
  • @lramos15
    • src/vs/workbench/services/telemetry/test/browser/commonProperties.test.ts
  • @alexdima
    • src/vs/base/test/browser/browser.test.ts
    • src/vs/base/test/browser/ui/scrollbar/scrollableElement.test.ts
    • src/vs/base/test/node/css.build.test.ts
    • src/vs/editor/contrib/gotoSymbol/test/browser/referencesModel.test.ts
    • src/vs/editor/test/common/services/languageService.test.ts
    • src/vs/editor/test/node/classification/typescript.test.ts
    • src/vs/platform/remote/test/common/remoteHosts.test.ts
    • src/vs/workbench/api/test/common/extHostExtensionActivator.test.ts
    • src/vs/workbench/services/extensions/test/common/extensionDescriptionRegistry.test.ts
  • @rebornix
    • src/vs/workbench/contrib/notebook/test/browser/notebookExecutionService.test.ts
    • src/vs/workbench/contrib/notebook/test/browser/notebookExecutionStateService.test.ts
  • @justschen
    • src/vs/editor/contrib/codeAction/test/browser/codeActionModel.test.ts
  • @hediet
    • src/vs/editor/test/node/diffing/defaultLinesDiffComputer.test.ts
    • src/vs/editor/test/node/diffing/fixtures.test.ts
  • @ulugbekna
    • src/vs/platform/contextkey/test/common/contextkey.test.ts
    • src/vs/platform/contextkey/test/common/parser.test.ts
    • src/vs/platform/contextkey/test/common/scanner.test.ts
    • src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts
    • src/vs/platform/keybinding/test/common/keybindingResolver.test.ts
    • src/vs/workbench/services/keybinding/test/browser/keybindingIO.test.ts
    • src/vs/editor/contrib/codeAction/test/browser/codeActionKeybindingResolver.test.ts
    • src/vs/platform/keybinding/test/common/keybindingLabels.test.ts
    • src/vs/workbench/services/keybinding/test/node/fallbackKeyboardMapper.test.ts
    • src/vs/workbench/services/keybinding/test/node/macLinuxKeyboardMapper.test.ts
    • src/vs/workbench/services/keybinding/test/node/windowsKeyboardMapper.test.ts
  • @joyceerhl
    • src/vs/workbench/api/test/browser/extHostWorkspace.test.ts
    • src/vs/workbench/contrib/editSessions/test/browser/editSessions.test.ts
  • @connor4312
    • src/vs/workbench/services/userActivity/test/browser/domActivityTracker.test.ts

Metadata

Metadata

Assignees

Labels

debtCode quality issuesengineeringVS Code - Build / issue tracking / etc.insiders-releasedPatch has been released in VS Code Insiders

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions