mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
testing: update test item async resolving
See https://github.com/microsoft/vscode/issues/126987#issuecomment-867031454
This commit makes the following changes:
- Keep the `resolveChildrenHandler`, and remove the CancellationToken parameter
- Remove `TestITem.status` and instead have `TestItem.canResolveChildren?: boolean`
- Add `TestItem.busy?: boolean`. Note that the UI would implicitly show
the item as busy while `resolve` is being called. (This is a new feature)
Upgrading to account for these changes should take around 10 to 20 minutes:
1. Where you previously set `item.status = vscode.TestItemStatus.Pending`,
instead set `item.canResolveChildren = true`.
2. If you used the cancellation token in resolveChildrenHandler, you no
longer need to do so. What you do here instead is up to you:
- If you set up global workspace watchers, add those to `context.subscriptions`
- You _probably_ don't need to set up watchers for "file" test items,
since you will receive updates via `vscode.workspace.onDidChangeTextDocument`
and/or any FileWatcher you have set up.
Example of an update: 7287c64bf7
This commit is contained in:
@@ -1273,7 +1273,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
NotebookControllerAffinity: extHostTypes.NotebookControllerAffinity,
|
||||
PortAttributes: extHostTypes.PortAttributes,
|
||||
LinkedEditingRanges: extHostTypes.LinkedEditingRanges,
|
||||
TestItemStatus: extHostTypes.TestItemStatus,
|
||||
TestResultState: extHostTypes.TestResultState,
|
||||
TestRunRequest: extHostTypes.TestRunRequest,
|
||||
TestMessage: extHostTypes.TestMessage,
|
||||
|
||||
Reference in New Issue
Block a user