From df17a2c7495cea22f803d1e2e22329712a7fd25a Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Wed, 28 Aug 2013 11:55:14 -0700 Subject: chore(travis): use ports proxied by SauceLabs Some browser does not allow to proxy localhost and so SL uses another proxy on the VM. This proxy only proxies some ports (SauceConnect proxies all ports). This is the issue why Safari didn't connect for e2e tests, because 9877 was not proxied. This change makes sure we use SL enabled ports. --- lib/grunt/utils.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/grunt/utils.js') diff --git a/lib/grunt/utils.js b/lib/grunt/utils.js index ed61a181..3c4b7254 100644 --- a/lib/grunt/utils.js +++ b/lib/grunt/utils.js @@ -253,7 +253,7 @@ module.exports = { stream: options && options.stream }; - args.push('--port=' + this.lastParallelTaskPort); + args.push('--port=' + this.sauceLabsAvailablePorts.pop()); if (args.indexOf('test:e2e') !== -1 && grunt.option('e2e-browsers')) { args.push('--browsers=' + grunt.option('e2e-browsers')); @@ -265,10 +265,9 @@ module.exports = { args.push('--reporters=' + grunt.option('reporters')); } - this.lastParallelTaskPort++; - return task; }, - lastParallelTaskPort: 9876 + // see http://saucelabs.com/docs/connect#localhost + sauceLabsAvailablePorts: [9000, 9001, 9080, 9090, 9876] }; -- cgit v1.2.3