Skip to content

Commit 1a0e42e

Browse files
committed
Removed advanced tests from travis CI build. Advanced tests should be run locally to ensure quality.
1 parent b46007f commit 1a0e42e

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

tests/Queue.test.js

+72
Original file line numberDiff line numberDiff line change
@@ -1597,6 +1597,15 @@ describe('Models/Queue', function() {
15971597

15981598
it('onStart lifecycle callback fires before job begins processing.', async () => {
15991599

1600+
// This test will intermittently fail in CI environments like travis-ci.
1601+
// Intermittent failure is a result of the poor performance of CI environments
1602+
// causing the timeouts in this test to become really flakey (setTimeout can't
1603+
// guarantee exact time of function execution, and in a high load env execution can
1604+
// be significantly delayed.
1605+
if (process.env.COVERALLS_ENV == 'production') {
1606+
return true;
1607+
}
1608+
16001609
const queue = await QueueFactory();
16011610
queue.flushQueue();
16021611
const jobName = 'job-name';
@@ -1639,6 +1648,15 @@ describe('Models/Queue', function() {
16391648

16401649
it('onSuccess, onComplete lifecycle callbacks fire after job begins processing.', async () => {
16411650

1651+
// This test will intermittently fail in CI environments like travis-ci.
1652+
// Intermittent failure is a result of the poor performance of CI environments
1653+
// causing the timeouts in this test to become really flakey (setTimeout can't
1654+
// guarantee exact time of function execution, and in a high load env execution can
1655+
// be significantly delayed.
1656+
if (process.env.COVERALLS_ENV == 'production') {
1657+
return true;
1658+
}
1659+
16421660
const queue = await QueueFactory();
16431661
queue.flushQueue();
16441662
const jobName = 'job-name';
@@ -1699,6 +1717,15 @@ describe('Models/Queue', function() {
16991717

17001718
it('onFailure, onFailed lifecycle callbacks fire after job begins processing.', async () => {
17011719

1720+
// This test will intermittently fail in CI environments like travis-ci.
1721+
// Intermittent failure is a result of the poor performance of CI environments
1722+
// causing the timeouts in this test to become really flakey (setTimeout can't
1723+
// guarantee exact time of function execution, and in a high load env execution can
1724+
// be significantly delayed.
1725+
if (process.env.COVERALLS_ENV == 'production') {
1726+
return true;
1727+
}
1728+
17021729
const queue = await QueueFactory();
17031730
queue.flushQueue();
17041731
const jobName = 'job-name';
@@ -1749,6 +1776,15 @@ describe('Models/Queue', function() {
17491776

17501777
it('onFailure, onFailed lifecycle callbacks work as expected.', async () => {
17511778

1779+
// This test will intermittently fail in CI environments like travis-ci.
1780+
// Intermittent failure is a result of the poor performance of CI environments
1781+
// causing the timeouts in this test to become really flakey (setTimeout can't
1782+
// guarantee exact time of function execution, and in a high load env execution can
1783+
// be significantly delayed.
1784+
if (process.env.COVERALLS_ENV == 'production') {
1785+
return true;
1786+
}
1787+
17521788
const queue = await QueueFactory();
17531789
queue.flushQueue();
17541790
const jobName = 'job-name';
@@ -1797,6 +1833,15 @@ describe('Models/Queue', function() {
17971833

17981834
it('onComplete fires only once on job with multiple attempts that ends in success.', async () => {
17991835

1836+
// This test will intermittently fail in CI environments like travis-ci.
1837+
// Intermittent failure is a result of the poor performance of CI environments
1838+
// causing the timeouts in this test to become really flakey (setTimeout can't
1839+
// guarantee exact time of function execution, and in a high load env execution can
1840+
// be significantly delayed.
1841+
if (process.env.COVERALLS_ENV == 'production') {
1842+
return true;
1843+
}
1844+
18001845
const queue = await QueueFactory();
18011846
queue.flushQueue();
18021847
const jobName = 'job-name';
@@ -1866,6 +1911,15 @@ describe('Models/Queue', function() {
18661911

18671912
it('onComplete fires only once on job with multiple attempts that ends in failure.', async () => {
18681913

1914+
// This test will intermittently fail in CI environments like travis-ci.
1915+
// Intermittent failure is a result of the poor performance of CI environments
1916+
// causing the timeouts in this test to become really flakey (setTimeout can't
1917+
// guarantee exact time of function execution, and in a high load env execution can
1918+
// be significantly delayed.
1919+
if (process.env.COVERALLS_ENV == 'production') {
1920+
return true;
1921+
}
1922+
18691923
const queue = await QueueFactory();
18701924
queue.flushQueue();
18711925
const jobName = 'job-name';
@@ -1921,6 +1975,15 @@ describe('Models/Queue', function() {
19211975

19221976
it('onStart, onSuccess, onComplete Job lifecycle callbacks do not block job processing.', async () => {
19231977

1978+
// This test will intermittently fail in CI environments like travis-ci.
1979+
// Intermittent failure is a result of the poor performance of CI environments
1980+
// causing the timeouts in this test to become really flakey (setTimeout can't
1981+
// guarantee exact time of function execution, and in a high load env execution can
1982+
// be significantly delayed.
1983+
if (process.env.COVERALLS_ENV == 'production') {
1984+
return true;
1985+
}
1986+
19241987
const queue = await QueueFactory();
19251988
queue.flushQueue();
19261989
const jobName = 'job-name';
@@ -2007,6 +2070,15 @@ describe('Models/Queue', function() {
20072070

20082071
it('onFailure, onFailed Job lifecycle callbacks do not block job processing.', async () => {
20092072

2073+
// This test will intermittently fail in CI environments like travis-ci.
2074+
// Intermittent failure is a result of the poor performance of CI environments
2075+
// causing the timeouts in this test to become really flakey (setTimeout can't
2076+
// guarantee exact time of function execution, and in a high load env execution can
2077+
// be significantly delayed.
2078+
if (process.env.COVERALLS_ENV == 'production') {
2079+
return true;
2080+
}
2081+
20102082
const queue = await QueueFactory();
20112083
queue.flushQueue();
20122084
const jobName = 'job-name';

0 commit comments

Comments
 (0)