From 63dad741ebae02602509dd3d6d00ddf9699c7016 Mon Sep 17 00:00:00 2001 From: Raghu Simha Date: Tue, 24 Apr 2018 19:06:37 -0400 Subject: [PATCH 1/2] Temporarily disable tests on Safari --- build-system/pr-check.js | 15 ++++++++------- build-system/tasks/runtime-test.js | 20 +++++++++++--------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/build-system/pr-check.js b/build-system/pr-check.js index 9ed1453b1d8d..2906316caf2f 100644 --- a/build-system/pr-check.js +++ b/build-system/pr-check.js @@ -307,13 +307,14 @@ const command = { } // Unit tests with Travis' default chromium timedExecOrDie(cmd + ' --headless'); - if (!!process.env.SAUCE_USERNAME) { - // A subset of unit tests on other browsers via sauce labs - cmd = cmd + ' --saucelabs_lite'; - startSauceConnect(); - timedExecOrDie(cmd); - stopSauceConnect(); - } + // TODO(rsimha, #14856): Re-enable after debugging Karma disconnects. + // if (!!process.env.SAUCE_USERNAME) { + // // A subset of unit tests on other browsers via sauce labs + // cmd = cmd + ' --saucelabs_lite'; + // startSauceConnect(); + // timedExecOrDie(cmd); + // stopSauceConnect(); + // } }, runIntegrationTests: function(compiled) { // Integration tests on chrome, or on all saucelabs browsers if set up diff --git a/build-system/tasks/runtime-test.js b/build-system/tasks/runtime-test.js index b4d54148170a..a6fc3421aa13 100644 --- a/build-system/tasks/runtime-test.js +++ b/build-system/tasks/runtime-test.js @@ -80,11 +80,12 @@ function getConfig() { 'SL_Chrome_latest', 'SL_Chrome_45', 'SL_Firefox_latest', - 'SL_Safari_latest', - 'SL_Safari_10', - 'SL_Safari_9', - 'SL_iOS_latest', - 'SL_iOS_10_0', + // TODO(rsimha, #14856): Re-enable after debugging Karma disconnects. + // 'SL_Safari_latest', + // 'SL_Safari_10', + // 'SL_Safari_9', + // 'SL_iOS_latest', + // 'SL_iOS_10_0', // TODO(rsimha, #14374): Re-enable these after upgrading wd. // 'SL_Edge_latest', // 'SL_IE_11', @@ -377,11 +378,11 @@ function runTests() { resolver(); }).on('run_start', function() { if (argv.saucelabs || argv.saucelabs_lite) { - console./* OK*/log(green( + log(green( 'Running tests in parallel on ' + c.browsers.length + ' Sauce Labs browser(s)...')); } else { - console./* OK*/log(green('Running tests locally...')); + log(green('Running tests locally...')); } }).on('run_complete', function() { if (shouldCollapseSummary) { @@ -392,7 +393,7 @@ function runTests() { }).on('browser_complete', function(browser) { if (shouldCollapseSummary) { const result = browser.lastResult; - let message = '\n' + browser.name + ': '; + let message = browser.name + ': '; message += 'Executed ' + (result.success + result.failed) + ' of ' + result.total + ' (Skipped ' + result.skipped + ') '; if (result.failed === 0) { @@ -401,7 +402,8 @@ function runTests() { message += red(result.failed + ' FAILED'); } message += '\n'; - console./* OK*/log(message); + console./* OK*/log('\n'); + log(message); } }).start(); return deferred.then(() => exitCtrlcHandler(handlerProcess)); From bd55679097e7d464dc0603f1be4b0b4569969c4b Mon Sep 17 00:00:00 2001 From: Raghu Simha Date: Tue, 24 Apr 2018 19:33:03 -0400 Subject: [PATCH 2/2] Make exit more robust --- build-system/tasks/runtime-test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build-system/tasks/runtime-test.js b/build-system/tasks/runtime-test.js index a6fc3421aa13..317d4e62aaad 100644 --- a/build-system/tasks/runtime-test.js +++ b/build-system/tasks/runtime-test.js @@ -372,9 +372,11 @@ function runTests() { log( red('ERROR:'), yellow('Karma test failed with exit code ' + exitCode)); - process.exitCode = exitCode; - self.emitAsync('exit'); } + // TODO(rsimha, 14814): Remove after Karma / Sauce ticket is resolved. + setTimeout(() => { + process.exit(exitCode); + }, 5000); resolver(); }).on('run_start', function() { if (argv.saucelabs || argv.saucelabs_lite) {