Skip to content

Commit dd748af

Browse files
committed
remove logOutputChannel from adapters
1 parent bde3052 commit dd748af

12 files changed

+71
-200
lines changed

src/client/testing/testController/controller.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { IExtensionSingleActivationService } from '../../activation/types';
2525
import { ICommandManager, IWorkspaceService } from '../../common/application/types';
2626
import * as constants from '../../common/constants';
2727
import { IPythonExecutionFactory } from '../../common/process/types';
28-
import { IConfigurationService, IDisposableRegistry, ILogOutputChannel, Resource } from '../../common/types';
28+
import { IConfigurationService, IDisposableRegistry, Resource } from '../../common/types';
2929
import { DelayedTrigger, IDelayedTrigger } from '../../common/utils/delayTrigger';
3030
import { noop } from '../../common/utils/misc';
3131
import { IInterpreterService } from '../../interpreter/contracts';
@@ -98,7 +98,6 @@ export class PythonTestController implements ITestController, IExtensionSingleAc
9898
@inject(ICommandManager) private readonly commandManager: ICommandManager,
9999
@inject(IPythonExecutionFactory) private readonly pythonExecFactory: IPythonExecutionFactory,
100100
@inject(ITestDebugLauncher) private readonly debugLauncher: ITestDebugLauncher,
101-
@inject(ILogOutputChannel) private readonly logOutputChannel: ILogOutputChannel,
102101
@inject(IEnvironmentVariablesProvider) private readonly envVarsService: IEnvironmentVariablesProvider,
103102
) {
104103
this.refreshCancellation = new CancellationTokenSource();
@@ -176,13 +175,11 @@ export class PythonTestController implements ITestController, IExtensionSingleAc
176175
resultResolver = new PythonResultResolver(this.testController, testProvider, workspace.uri);
177176
discoveryAdapter = new UnittestTestDiscoveryAdapter(
178177
this.configSettings,
179-
this.logOutputChannel,
180178
resultResolver,
181179
this.envVarsService,
182180
);
183181
executionAdapter = new UnittestTestExecutionAdapter(
184182
this.configSettings,
185-
this.logOutputChannel,
186183
resultResolver,
187184
this.envVarsService,
188185
);
@@ -191,13 +188,11 @@ export class PythonTestController implements ITestController, IExtensionSingleAc
191188
resultResolver = new PythonResultResolver(this.testController, testProvider, workspace.uri);
192189
discoveryAdapter = new PytestTestDiscoveryAdapter(
193190
this.configSettings,
194-
this.logOutputChannel,
195191
resultResolver,
196192
this.envVarsService,
197193
);
198194
executionAdapter = new PytestTestExecutionAdapter(
199195
this.configSettings,
200-
this.logOutputChannel,
201196
resultResolver,
202197
this.envVarsService,
203198
);

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
IPythonExecutionFactory,
1010
SpawnOptions,
1111
} from '../../../common/process/types';
12-
import { IConfigurationService, ILogOutputChannel } from '../../../common/types';
12+
import { IConfigurationService } from '../../../common/types';
1313
import { createDeferred, Deferred } from '../../../common/utils/async';
1414
import { EXTENSION_ROOT_DIR } from '../../../constants';
1515
import { traceError, traceInfo, traceVerbose, traceWarn } from '../../../logging';
@@ -32,7 +32,6 @@ import { useEnvExtension, getEnvironment, runInBackground } from '../../../envEx
3232
export class PytestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
3333
constructor(
3434
public configSettings: IConfigurationService,
35-
private readonly outputChannel: ILogOutputChannel,
3635
private readonly resultResolver?: ITestResultResolver,
3736
private readonly envVarsService?: IEnvironmentVariablesProvider,
3837
) {}
@@ -161,7 +160,6 @@ export class PytestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
161160
const spawnOptions: SpawnOptions = {
162161
cwd,
163162
throwOnStdErr: true,
164-
outputChannel: this.outputChannel,
165163
env: mutableEnv,
166164
token,
167165
};

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { CancellationTokenSource, DebugSessionOptions, TestRun, TestRunProfileKind, Uri } from 'vscode';
55
import * as path from 'path';
66
import { ChildProcess } from 'child_process';
7-
import { IConfigurationService, ILogOutputChannel } from '../../../common/types';
7+
import { IConfigurationService } from '../../../common/types';
88
import { Deferred } from '../../../common/utils/async';
99
import { traceError, traceInfo, traceVerbose } from '../../../logging';
1010
import { ExecutionTestPayload, ITestExecutionAdapter, ITestResultResolver } from '../common/types';
@@ -25,7 +25,6 @@ import { getEnvironment, runInBackground, useEnvExtension } from '../../../envEx
2525
export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
2626
constructor(
2727
public configSettings: IConfigurationService,
28-
private readonly outputChannel: ILogOutputChannel,
2928
private readonly resultResolver?: ITestResultResolver,
3029
private readonly envVarsService?: IEnvironmentVariablesProvider,
3130
) {}
@@ -146,7 +145,6 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
146145
const spawnOptions: SpawnOptions = {
147146
cwd,
148147
throwOnStdErr: true,
149-
outputChannel: this.outputChannel,
150148
env: mutableEnv,
151149
token: runInstance?.token,
152150
};

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as path from 'path';
55
import { CancellationTokenSource, Uri } from 'vscode';
66
import { CancellationToken } from 'vscode-jsonrpc';
77
import { ChildProcess } from 'child_process';
8-
import { IConfigurationService, ILogOutputChannel } from '../../../common/types';
8+
import { IConfigurationService } from '../../../common/types';
99
import { EXTENSION_ROOT_DIR } from '../../../constants';
1010
import {
1111
DiscoveredTestPayload,
@@ -32,7 +32,6 @@ import { getEnvironment, runInBackground, useEnvExtension } from '../../../envEx
3232
export class UnittestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
3333
constructor(
3434
public configSettings: IConfigurationService,
35-
private readonly logOutputChannel: ILogOutputChannel,
3635
private readonly resultResolver?: ITestResultResolver,
3736
private readonly envVarsService?: IEnvironmentVariablesProvider,
3837
) {}
@@ -74,7 +73,6 @@ export class UnittestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
7473
workspaceFolder: uri,
7574
command,
7675
cwd,
77-
outChannel: this.logOutputChannel,
7876
token,
7977
};
8078

@@ -147,7 +145,6 @@ export class UnittestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
147145
token: options.token,
148146
cwd: options.cwd,
149147
throwOnStdErr: true,
150-
outputChannel: options.outChannel,
151148
env: mutableEnv,
152149
};
153150

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import * as path from 'path';
55
import { CancellationTokenSource, DebugSessionOptions, TestRun, TestRunProfileKind, Uri } from 'vscode';
66
import { ChildProcess } from 'child_process';
7-
import { IConfigurationService, ILogOutputChannel } from '../../../common/types';
7+
import { IConfigurationService } from '../../../common/types';
88
import { Deferred, createDeferred } from '../../../common/utils/async';
99
import { EXTENSION_ROOT_DIR } from '../../../constants';
1010
import {
@@ -35,7 +35,6 @@ import { getEnvironment, runInBackground, useEnvExtension } from '../../../envEx
3535
export class UnittestTestExecutionAdapter implements ITestExecutionAdapter {
3636
constructor(
3737
public configSettings: IConfigurationService,
38-
private readonly outputChannel: ILogOutputChannel,
3938
private readonly resultResolver?: ITestResultResolver,
4039
private readonly envVarsService?: IEnvironmentVariablesProvider,
4140
) {}
@@ -122,7 +121,6 @@ export class UnittestTestExecutionAdapter implements ITestExecutionAdapter {
122121
cwd,
123122
profileKind,
124123
testIds,
125-
outChannel: this.outputChannel,
126124
token: runInstance?.token,
127125
};
128126
traceLog(`Running UNITTEST execution for the following test ids: ${testIds}`);
@@ -140,7 +138,6 @@ export class UnittestTestExecutionAdapter implements ITestExecutionAdapter {
140138
token: options.token,
141139
cwd: options.cwd,
142140
throwOnStdErr: true,
143-
outputChannel: options.outChannel,
144141
env: mutableEnv,
145142
};
146143
// Create the Python environment in which to execute the command.

0 commit comments

Comments
 (0)