altering the timings on some tests to make them slightly less flaky (maybe)

This commit is contained in:
Gareth Jones 2014-08-15 20:06:35 +10:00
parent fb9948145c
commit a27345461b
3 changed files with 24 additions and 26 deletions

View File

@ -60,7 +60,7 @@ vows.describe('log4js categoryFilter').addBatch({
weblogger.info('00:00:00 GET / 200'); weblogger.info('00:00:00 GET / 200');
weblogger.warn('00:00:00 GET / 500'); weblogger.warn('00:00:00 GET / 500');
//wait for the file system to catch up //wait for the file system to catch up
setTimeout(this.callback, 100); setTimeout(this.callback, 500);
}, },
'tmp-tests.log': { 'tmp-tests.log': {
topic: function() { topic: function() {

View File

@ -56,7 +56,7 @@ vows.describe('log4js logLevelFilter').addBatch({
logger.warn('both'); logger.warn('both');
logger.debug('main'); logger.debug('main');
//wait for the file system to catch up //wait for the file system to catch up
setTimeout(this.callback, 100); setTimeout(this.callback, 500);
}, },
'tmp-tests.log': { 'tmp-tests.log': {
topic: function() { topic: function() {

View File

@ -150,10 +150,10 @@ vows.describe('log4js smtpAppender').addBatch({
}, 500); }, 500);
setTimeout(function () { setTimeout(function () {
setup.logger.info('Log event #3'); setup.logger.info('Log event #3');
}, 1050); }, 1100);
setTimeout(function () { setTimeout(function () {
self.callback(null, setup); self.callback(null, setup);
}, 2100); }, 3000);
}, },
'there should be three messages': function (result) { 'there should be three messages': function (result) {
assert.equal(result.results.length, 3); assert.equal(result.results.length, 3);
@ -181,13 +181,13 @@ vows.describe('log4js smtpAppender').addBatch({
}, 0); }, 0);
setTimeout(function () { setTimeout(function () {
setup.logger.info('Log event #2'); setup.logger.info('Log event #2');
}, 500); }, 100);
setTimeout(function () { setTimeout(function () {
setup.logger.info('Log event #3'); setup.logger.info('Log event #3');
}, 1050); }, 1500);
setTimeout(function () { setTimeout(function () {
self.callback(null, setup); self.callback(null, setup);
}, 2100); }, 3000);
}, },
'there should be two messages': function (result) { 'there should be two messages': function (result) {
assert.equal(result.results.length, 2); assert.equal(result.results.length, 2);
@ -228,6 +228,4 @@ vows.describe('log4js smtpAppender').addBatch({
assert.equal(cons.errors[0].value.message, 'oh noes'); assert.equal(cons.errors[0].value.message, 'oh noes');
} }
} }
}).export(module); }).export(module);