mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Notebook server shutdown error (#3976)
* fix #3959 - Notebook shutdown error * Removing the unit test case to stopserver from clientSession
This commit is contained in:
@@ -305,10 +305,6 @@ export class ClientSession implements IClientSession {
|
|||||||
if (this._session && this._session.id) {
|
if (this._session && this._session.id) {
|
||||||
await this.notebookManager.sessionManager.shutdown(this._session.id);
|
await this.notebookManager.sessionManager.shutdown(this._session.id);
|
||||||
}
|
}
|
||||||
let serverManager = this.notebookManager.serverManager;
|
|
||||||
if (serverManager) {
|
|
||||||
await serverManager.stopServer();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -181,22 +181,4 @@ describe('Client Session', function (): void {
|
|||||||
mockSessionManager.verify(s => s.shutdown(TypeMoq.It.isValue(expectedId)), TypeMoq.Times.once());
|
mockSessionManager.verify(s => s.shutdown(TypeMoq.It.isValue(expectedId)), TypeMoq.Times.once());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
it('Should stop server if server is set', async function (): Promise<void> {
|
|
||||||
// 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();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user