From 35c446981652feeaab4bc731bcdf2f2f366d99c0 Mon Sep 17 00:00:00 2001 From: juliemr Date: Sun, 18 Dec 2016 00:57:24 -0800 Subject: [PATCH] To be squashed - fix interactive tests --- lib/debugger.ts | 5 +++-- lib/debugger/clients/explorer.js | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/debugger.ts b/lib/debugger.ts index 929de70fb..93b640d93 100644 --- a/lib/debugger.ts +++ b/lib/debugger.ts @@ -40,7 +40,8 @@ export class DebugHelper { * @param {number=} opt_debugPort Optional port to u`se for the debugging * process. */ - init(debuggerClientPath: string, blockUntilExit: boolean, onStartFn: Function, + init( + debuggerClientPath: string, blockUntilExit: boolean, onStartFn: Function, opt_debugPort?: number) { webdriver.promise.ControlFlow.prototype.getControlFlowText = function() { let controlFlowText = this.getSchedule(/* opt_includeStackTraces */ true); @@ -124,7 +125,7 @@ export class DebugHelper { // To be able to simulate callback/asynchronous code, we poll this object // whenever `breakpointHook` is called. this.dbgCodeExecutor = { - execPromise_: null, // Promise pointing to currently executing command. + execPromise_: null, // Promise pointing to currently executing command. execPromiseResult_: undefined, // Return value of promise. execPromiseError_: undefined, // Error from promise. diff --git a/lib/debugger/clients/explorer.js b/lib/debugger/clients/explorer.js index 0c00b167e..b0dee20c2 100644 --- a/lib/debugger/clients/explorer.js +++ b/lib/debugger/clients/explorer.js @@ -38,6 +38,10 @@ WdRepl.prototype.initServer_ = function(port) { // Intentionally blank. }); sock.end(); + // TODO(juliemr): Investigate why this is necessary. At this point, there + // should be no active listeners so this process should just exit + // by itself. + process.exit(0); } else if (input[input.length - 1] === '\t') { // If the last character is the TAB key, this is an autocomplete // request. We use everything before the TAB as the init data to feed