From 7dd32ed44beff1178ffa65b39c265aed8f8e058a Mon Sep 17 00:00:00 2001 From: Raj <44002319+rajmusuku@users.noreply.github.com> Date: Fri, 8 Feb 2019 13:51:00 -0800 Subject: [PATCH] Notebook server shutdown error (#3976) * fix #3959 - Notebook shutdown error * Removing the unit test case to stopserver from clientSession --- src/sql/parts/notebook/models/clientSession.ts | 4 ---- .../parts/notebook/model/clientSession.test.ts | 18 ------------------ 2 files changed, 22 deletions(-) diff --git a/src/sql/parts/notebook/models/clientSession.ts b/src/sql/parts/notebook/models/clientSession.ts index 6a63ebceb6..bd19289391 100644 --- a/src/sql/parts/notebook/models/clientSession.ts +++ b/src/sql/parts/notebook/models/clientSession.ts @@ -305,10 +305,6 @@ export class ClientSession implements IClientSession { if (this._session && this._session.id) { await this.notebookManager.sessionManager.shutdown(this._session.id); } - let serverManager = this.notebookManager.serverManager; - if (serverManager) { - await serverManager.stopServer(); - } } /** diff --git a/src/sqltest/parts/notebook/model/clientSession.test.ts b/src/sqltest/parts/notebook/model/clientSession.test.ts index fd762e5d77..004b83bd54 100644 --- a/src/sqltest/parts/notebook/model/clientSession.test.ts +++ b/src/sqltest/parts/notebook/model/clientSession.test.ts @@ -181,22 +181,4 @@ describe('Client Session', function (): void { mockSessionManager.verify(s => s.shutdown(TypeMoq.It.isValue(expectedId)), TypeMoq.Times.once()); }); - - it('Should stop server if server is set', async function (): Promise { - // Given a kernel has been started - serverManager.isStarted = true; - serverManager.result = Promise.resolve(); - mockSessionManager.setup(s => s.isReady).returns(() => true); - mockSessionManager.setup(s => s.shutdown(TypeMoq.It.isAny())).returns(() => Promise.resolve()); - - await session.initialize(); - - // When I call shutdown - await session.shutdown(); - - // Then - should(serverManager.calledEnd).be.true(); - }); - - });