Notebooks: More Jupyter Server Hardening (#5264)

* Do not rely on same starting port every time, misc

* put back to 5 seconds for process kill timeout

* extHostNotebook shutdown manager handle
This commit is contained in:
Chris LaFreniere
2019-04-30 14:13:04 -07:00
committed by GitHub
parent 0f12d15020
commit e72d0d03ed
4 changed files with 13 additions and 8 deletions

View File

@@ -39,7 +39,7 @@ describe('Ports', () => {
this.timeout(1000 * 10); // higher timeout for this test
// get an initial freeport >= 7000
let options = new ports.StrictPortFindOptions(7000, 7100, 7200);
let options = new ports.StrictPortFindOptions(7000, 7200);
options.timeout = 300000;
ports.strictFindFreePort(options).then(initialPort => {
assert.ok(initialPort >= 7000);
@@ -49,7 +49,7 @@ describe('Ports', () => {
server.listen(initialPort, undefined, undefined, () => {
// once listening, find another free port and assert that the port is different from the opened one
options.startPort = initialPort;
options.minPort = initialPort;
options.maxRetriesPerStartPort = 1;
options.totalRetryLoops = 50;
ports.strictFindFreePort(options).then(freePort => {