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: https://github.com/microsoft/vscode-selfhost-test-provider/commit/7287c64bf72f4ed037a3cb57f05220bbe1b38d84
Showing
想要评论请 注册 或 登录