Skip to content

Commit a47d991

Browse files
committed
cont revert
1 parent 624ec42 commit a47d991

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/client/testing/testController/pytest/pytestExecutionAdapter.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
import { CancellationTokenSource, DebugSessionOptions, TestRun, TestRunProfileKind, Uri } from 'vscode';
4+
import { DebugSessionOptions, TestRun, TestRunProfileKind, Uri } from 'vscode';
55
import * as path from 'path';
66
import { ChildProcess } from 'child_process';
77
import { IConfigurationService, ITestOutputChannel } from '../../../common/types';
@@ -174,7 +174,7 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
174174
await debugLauncher!.launchDebugger(
175175
launchOptions,
176176
() => {
177-
serverCancel.cancel();
177+
serverDispose(); // this will resolve the deferredTillAllServerClose
178178
},
179179
sessionOptions,
180180
);
@@ -196,7 +196,7 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
196196
traceInfo(`Test run cancelled, killing pytest subprocess for workspace ${uri.fsPath}`);
197197
proc.kill();
198198
deferredTillExecClose.resolve();
199-
serverCancel.cancel();
199+
serverDispose(); // this will resolve the deferredTillAllServerClose
200200
});
201201
proc.stdout.on('data', (data) => {
202202
const out = utils.fixLogLinesNoTrailing(data.toString());
@@ -216,7 +216,7 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
216216
);
217217
}
218218
deferredTillExecClose.resolve();
219-
serverCancel.cancel();
219+
serverDispose(); // this will resolve the deferredTillAllServerClose
220220
});
221221
await deferredTillExecClose.promise;
222222
} else {

src/client/testing/testController/unittest/testExecutionAdapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT License.
33

44
import * as path from 'path';
5-
import { CancellationTokenSource, DebugSessionOptions, TestRun, TestRunProfileKind, Uri } from 'vscode';
5+
import { DebugSessionOptions, TestRun, TestRunProfileKind, Uri } from 'vscode';
66
import { ChildProcess } from 'child_process';
77
import { IConfigurationService, ITestOutputChannel } from '../../../common/types';
88
import { Deferred, createDeferred } from '../../../common/utils/async';

0 commit comments

Comments
 (0)