From 097c7b689a6e8b8ddff526897df9b478b139e500 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 31 Aug 2017 09:19:08 +0200 Subject: [PATCH] Try a different configuration to make SauceConnect work in Travis again --- .travis.yml | 4 ++-- package.json | 5 +++-- test/karma.config.js | 22 ++++++++++++++-------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 31b19fb537..8849be3542 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,8 +15,8 @@ branches: only: - master addons: - sauce_connect: - username: openlayers + hosts: + - travis.dev jwt: # This is the encrypted SAUCE_ACCESS_KEY secure: bb2Ibzu9RLe6ZlIG7JVcuH7IoLMxa/i3LTM7t8mbsPjVOGs5ycyJ7M9MbvqB/F2EzbeV4XB2c9ufI4TkaLYceY5kdWjfZVN8iasr+GFqKMv1uR4i6bpu8KmHJ+blxwfY1QOQ/cGwEx+fbeycMtpTc3Y3GyXaPlCQLhbZvesMg88= diff --git a/package.json b/package.json index b7edd7216e..ccec1da644 100644 --- a/package.json +++ b/package.json @@ -67,8 +67,8 @@ "jquery": "3.2.1", "jscodeshift": "^0.3.30", "karma": "^1.7.0", - "karma-coverage": "^1.1.1", "karma-chrome-launcher": "^2.1.1", + "karma-coverage": "^1.1.1", "karma-firefox-launcher": "^1.0.1", "karma-mocha": "^1.3.0", "karma-sauce-launcher": "^1.1.0", @@ -83,7 +83,8 @@ "proj4": "2.4.4", "serve-files": "1.0.1", "sinon": "3.2.1", - "slimerjs": "0.10.3" + "slimerjs": "0.10.3", + "url-polyfill": "^1.0.7" }, "eslintConfig": { "extends": "openlayers", diff --git a/test/karma.config.js b/test/karma.config.js index 5f1a0f4f5c..5e72edd2ac 100644 --- a/test/karma.config.js +++ b/test/karma.config.js @@ -15,11 +15,14 @@ module.exports = function(karma) { karma.set({ frameworks: ['mocha'], client: { - runInParent: true + runInParent: true, + mocha: { + timeout: 2500 + } }, files: [ { - pattern: 'https://cdn.polyfill.io/v2/polyfill.min.js?features=URL|gated', + pattern: path.resolve(__dirname, require.resolve('url-polyfill/url-polyfill.js')), watched: false }, { @@ -98,7 +101,7 @@ module.exports = function(karma) { // }, SL_Safari: { base: 'SauceLabs', - platform: 'macos 10.12', + platform: 'macOS 10.12', browserName: 'safari' } }; @@ -106,15 +109,18 @@ module.exports = function(karma) { sauceLabs: { testName: testName, recordScreenshots: false, - connectOptions: { - port: 5757 - }, - startConnect: false, + startConnect: true, tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER, username: 'openlayers', - accessKey: process.env.SAUCE_ACCESS_KEY + accessKey: process.env.SAUCE_ACCESS_KEY, + connectOptions: { + noSslBumpDomains: 'all' + } }, + hostname: 'travis.dev', reporters: ['dots', 'saucelabs', 'coverage'], + browserDisconnectTimeout: 10000, + browserDisconnectTolerance: 1, captureTimeout: 240000, browserNoActivityTimeout: 240000, customLaunchers: customLaunchers,