Skip to content

Commit

Permalink
Register test manager when using the new language server (#2187)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne authored Jul 18, 2018
1 parent a002099 commit 65ff9e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/2 Fixes/2186.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Register test manager when using the new language server.
8 changes: 7 additions & 1 deletion src/client/activation/languageServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ import { isTestExecution, STANDARD_OUTPUT_CHANNEL } from '../common/constants';
import { createDeferred, Deferred } from '../common/helpers';
import { IFileSystem, IPlatformService } from '../common/platform/types';
import { StopWatch } from '../common/stopWatch';
import { IConfigurationService, IExtensionContext, IOutputChannel, IPythonSettings } from '../common/types';
import { IConfigurationService, IExtensionContext, ILogger, IOutputChannel, IPythonSettings } from '../common/types';
import { IServiceContainer } from '../ioc/types';
import {
PYTHON_LANGUAGE_SERVER_DOWNLOADED,
PYTHON_LANGUAGE_SERVER_ENABLED,
PYTHON_LANGUAGE_SERVER_ERROR
} from '../telemetry/constants';
import { getTelemetryReporter } from '../telemetry/telemetry';
import { IUnitTestManagementService } from '../unittests/types';
import { LanguageServerDownloader } from './downloader';
import { InterpreterData, InterpreterDataService } from './interpreterDataService';
import { PlatformData } from './platformData';
Expand Down Expand Up @@ -89,6 +90,11 @@ export class LanguageServerExtensionActivator implements IExtensionActivator {
if (!clientOptions) {
return false;
}

const testManagementService = this.services.get<IUnitTestManagementService>(IUnitTestManagementService);
testManagementService.activate()
.catch(ex => this.services.get<ILogger>(ILogger).logError('Failed to activate Unit Tests', ex));

return this.startLanguageServer(clientOptions);
}

Expand Down

0 comments on commit 65ff9e3

Please sign in to comment.