Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit df17a2c

Browse files
committed
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.
1 parent a30a3cf commit df17a2c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/grunt/utils.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ module.exports = {
253253
stream: options && options.stream
254254
};
255255

256-
args.push('--port=' + this.lastParallelTaskPort);
256+
args.push('--port=' + this.sauceLabsAvailablePorts.pop());
257257

258258
if (args.indexOf('test:e2e') !== -1 && grunt.option('e2e-browsers')) {
259259
args.push('--browsers=' + grunt.option('e2e-browsers'));
@@ -265,10 +265,9 @@ module.exports = {
265265
args.push('--reporters=' + grunt.option('reporters'));
266266
}
267267

268-
this.lastParallelTaskPort++;
269-
270268
return task;
271269
},
272270

273-
lastParallelTaskPort: 9876
271+
// see http://saucelabs.com/docs/connect#localhost
272+
sauceLabsAvailablePorts: [9000, 9001, 9080, 9090, 9876]
274273
};

0 commit comments

Comments
 (0)