Cleanup travis.yml, tweak how pull requests are handled in saucelabs.js, and tweak timing tests in test/test.js.

This commit is contained in:
John-David Dalton
2013-11-02 20:53:51 -07:00
parent dfab332285
commit d743ec2d2b
3 changed files with 18 additions and 15 deletions

View File

@@ -16,6 +16,11 @@
accessKey = process.env.SAUCE_ACCESS_KEY,
tunnelId = 'lodash_' + process.env.TRAVIS_JOB_NUMBER;
if (!accessKey) {
console.error('Testing skipped for pull requests');
process.exit(0);
}
var runnerPathname = (function() {
var args = process.argv;
return args.length > 2
@@ -85,20 +90,19 @@
mount(req, res);
}).listen(port);
// set up sauce connect so we can use this server from saucelabs
// set up Sauce Connect so we can use this server from Sauce Labs
var tunnelTimeout = 10000,
tunnel = new SauceTunnel(username, accessKey, tunnelId, true, tunnelTimeout);
console.log('Opening sauce connect tunnel...');
console.log('Opening Sauce Connect tunnel...');
tunnel.start(function(success) {
if (success) {
console.log('Sauce connect tunnel opened');
console.log('Sauce Connect tunnel opened');
runTests();
} else {
// fail without an exit code for pull requests
console.error('Failed to open sauce connect tunnel');
process.exit(0);
console.error('Failed to open Sauce Connect tunnel');
process.exit(2);
}
});
@@ -195,7 +199,7 @@
});
}
console.log('Shutting down sauce connect tunnel...');
console.log('Shutting down Sauce Connect tunnel...');
tunnel.stop(function() {
process.exit(failingTests.length ? 1 : 0);

View File

@@ -259,7 +259,7 @@
asyncTest('supports loading ' + basename + ' in a web worker', 1, function() {
if (Worker && !isModularize) {
var limit = 1000,
var limit = 2000,
start = new Date;
var attempt = function() {
@@ -5443,7 +5443,6 @@
test('supports not passing a `max` argument', 1, function() {
var actual = _.random(5),
limit = 60,
start = new Date;
ok(_.some(array, function() {
@@ -6902,7 +6901,7 @@
setTimeout(function() {
ok(count > lastCount);
QUnit.start();
}, 192);
}, 256);
}
else {
skipTest(2);