Skip to content

Commit 882a038

Browse files
authored
Resolve session promise on test run cancellation (#1466)
When running a standard test session (not debugging) the xctest process was terminated when the user hit the cancel test button, but the promise to continue and mark the test run as ended was not resolved. This kept the UI in a state that looked like the test was still running.
1 parent 15c4e6b commit 882a038

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/TestExplorer/TestRunner.ts

+1
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ export class TestRunner {
776776
// If the test run is iterrupted by a cancellation request from VS Code, ensure the task is terminated.
777777
const cancellationDisposable = this.testRun.token.onCancellationRequested(() => {
778778
task.execution.terminate("SIGINT");
779+
reject("Test run cancelled");
779780
});
780781

781782
task.execution.onDidClose(code => {

0 commit comments

Comments
 (0)