From cda7a46a66dc2221c5826bd78e63a327c10b8108 Mon Sep 17 00:00:00 2001 From: Maciej Adwent Date: Thu, 28 Jul 2016 10:42:18 -0700 Subject: [PATCH] Add support for fast-failed connections in sauce tunnels --- src/sauce/settings.js | 1 + src/sauce/tunnel.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/sauce/settings.js b/src/sauce/settings.js index b2b45b7..e37816f 100644 --- a/src/sauce/settings.js +++ b/src/sauce/settings.js @@ -20,6 +20,7 @@ var config = { tunnelTimeout: process.env.SAUCE_TUNNEL_CLOSE_TIMEOUT, useTunnels: !!argv.create_tunnels, maxTunnels: argv.num_tunnels || 1, + fastFailRegexps: process.env.SAUCE_TUNNEL_FAST_FAIL_REGEXPS, locksServerLocation: argv.locks_server || process.env.LOCKS_SERVER, locksOutageTimeout: 1000 * 60 * 5, diff --git a/src/sauce/tunnel.js b/src/sauce/tunnel.js index c21ccf8..d36662b 100644 --- a/src/sauce/tunnel.js +++ b/src/sauce/tunnel.js @@ -69,6 +69,10 @@ module.exports = { logfile: logFilePath }; + if (settings.fastFailRegexps) { + sauceOptions.fastFailRegexps = settings.fastFailRegexps; + } + var seleniumPort = options.seleniumPort; if (seleniumPort) { sauceOptions.port = seleniumPort;