Starting Fewer Jupyter Servers for Notebooks (#7744)

* Start fewer Jupyter servers

* Windows fix for drive casing

* PR Feedback

* Quick fix

* Fixing bug

* Ensure environment variables set 4 session startup

* test fix

* Dummy commit to update comment
This commit is contained in:
Chris LaFreniere
2019-10-20 21:38:58 -07:00
committed by GitHub
parent 0bfb1aab7e
commit e3ae5263c6
9 changed files with 118 additions and 43 deletions

View File

@@ -11,7 +11,7 @@ import 'mocha';
import { JupyterServerInstallation } from '../../jupyter/jupyterServerInstallation';
import { ApiWrapper } from '../..//common/apiWrapper';
import { PerNotebookServerInstance, ServerInstanceUtils } from '../../jupyter/serverInstance';
import { PerFolderServerInstance, ServerInstanceUtils } from '../../jupyter/serverInstance';
import { MockOutputChannel } from '../common/stubs';
import * as testUtils from '../common/testUtils';
import { LocalJupyterServerManager } from '../../jupyter/jupyterServerManager';
@@ -27,7 +27,7 @@ describe('Jupyter server instance', function (): void {
let mockOutputChannel: TypeMoq.IMock<MockOutputChannel>;
let mockApiWrapper: TypeMoq.IMock<ApiWrapper>;
let mockUtils: TypeMoq.IMock<ServerInstanceUtils>;
let serverInstance: PerNotebookServerInstance;
let serverInstance: PerFolderServerInstance;
beforeEach(() => {
mockApiWrapper = TypeMoq.Mock.ofType(ApiWrapper);
@@ -40,7 +40,7 @@ describe('Jupyter server instance', function (): void {
mockInstall.object.execOptions = { env: Object.assign({}, process.env) };
mockUtils = TypeMoq.Mock.ofType(ServerInstanceUtils);
mockUtils.setup(u => u.ensureProcessEnded(TypeMoq.It.isAny())).returns(() => undefined);
serverInstance = new PerNotebookServerInstance({
serverInstance = new PerFolderServerInstance({
documentPath: expectedPath,
install: mockInstall.object
}, mockUtils.object);