From 1cc3cb5408039522e1d9617156ba87e1946b7e60 Mon Sep 17 00:00:00 2001 From: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com> Date: Wed, 8 May 2019 13:16:09 -0700 Subject: [PATCH] Notebook Port Test Fix (#5433) * Test fixes to not rely on 7100 * PR comments --- extensions/notebook/src/test/common/port.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/extensions/notebook/src/test/common/port.test.ts b/extensions/notebook/src/test/common/port.test.ts index 14ab8bcdc1..41cd49a6dc 100644 --- a/extensions/notebook/src/test/common/port.test.ts +++ b/extensions/notebook/src/test/common/port.test.ts @@ -26,8 +26,8 @@ describe('Ports', () => { // once listening, find another free port and assert that the port is different from the opened one ports.findFreePort(7000, 50, 300000).then(freePort => { - assert.ok(freePort >= 7000 && freePort !== initialPort); server.close(); + assert.ok(freePort >= 7000 && freePort !== initialPort); done(); }, err => done(err)); @@ -51,11 +51,10 @@ describe('Ports', () => { // once listening, find another free port and assert that the port is different from the opened one options.minPort = initialPort; options.maxRetriesPerStartPort = 1; - options.totalRetryLoops = 50; + options.totalRetryLoops = 10; ports.strictFindFreePort(options).then(freePort => { - assert.ok(freePort >= 7100 && freePort !== initialPort); server.close(); - + assert(freePort !== initialPort, `Expected freePort !== initialPort, Actual: ${freePort}`); done(); }, err => done(err)); });