testing: improve cancellation, and allow test runs to be individually cancelled

Fixes #125712
This commit is contained in:
Connor Peet
2021-06-14 16:45:52 -07:00
parent 7103a76195
commit ec65867a75
12 changed files with 354 additions and 158 deletions

View File

@@ -52,6 +52,10 @@ export class MainThreadTesting extends Disposable implements MainThreadTestingSh
this.proxy.$publishTestResults(prevResults);
}
this._register(this.testService.onCancelTestRun(({ runId }) => {
this.proxy.$cancelExtensionTestRun(runId);
}));
this._register(resultService.onResultsChanged(evt => {
const results = 'completed' in evt ? evt.completed : ('inserted' in evt ? evt.inserted : undefined);
const serialized = results?.toJSON();