Package: node-mocha / 4.1.0+ds3-5

0006-Increase-test-timeouts.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
From 1ea49e247d1a93ca9111ae0c25412bafae55aab4 Mon Sep 17 00:00:00 2001
From: Xavier Guimard <yadd@debian.org>
Date: Fri, 11 Jan 2019 11:55:50 +0100
Subject: Increase test timeouts

---
 Makefile                                   | 2 +-
 test/integration/compiler-globbing.spec.js | 2 +-
 test/integration/options.spec.js           | 4 ++--
 test/integration/regression.spec.js        | 2 +-
 test/integration/suite.spec.js             | 6 +++---
 test/node-unit/color.spec.js               | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 5e008f3c..cabf3c4f 100644
--- a/Makefile
+++ b/Makefile
@@ -68,7 +68,7 @@ test-unit:
 
 test-integration:
 	@printf "==> [Test :: Integrations]\n"
-	$(call test_node,integration) --timeout 5000 --slow 500 \
+	$(call test_node,integration) --timeout 10000 --slow 1000 \
 		test/integration/*.spec.js
 
 test-compilers:
diff --git a/test/integration/compiler-globbing.spec.js b/test/integration/compiler-globbing.spec.js
index ee0a7237..df5e8852 100644
--- a/test/integration/compiler-globbing.spec.js
+++ b/test/integration/compiler-globbing.spec.js
@@ -6,7 +6,7 @@ var path = require('path');
 
 describe('globbing like --compilers', function () {
   it('should find a file of each type', function (done) {
-    exec('"' + process.execPath + '" "' + path.join('bin', 'mocha') + '" -R json --require coffee-script/register --require test/compiler-fixtures/foo.fixture "test/compiler/*.@(coffee|foo)"', { cwd: path.join(__dirname, '..', '..') }, function (error, stdout) {
+    exec('"' + process.execPath + '" "' + path.join('bin', 'mocha') + '" --timeout 10000 -R json --require coffee-script/register --require test/compiler-fixtures/foo.fixture "test/compiler/*.@(coffee|foo)"', { cwd: path.join(__dirname, '..', '..') }, function (error, stdout) {
       if (error && !stdout) { return done(error); }
       var results = JSON.parse(stdout);
       expect(results).to.have.property('tests');
diff --git a/test/integration/options.spec.js b/test/integration/options.spec.js
index e4ecc96c..13fba3ff 100644
--- a/test/integration/options.spec.js
+++ b/test/integration/options.spec.js
@@ -317,7 +317,7 @@ describe('options', function () {
     var runExit = function (shouldExit, behavior) {
       return function (done) {
         this.timeout(0);
-        this.slow(3000);
+        this.slow(6000);
         var didExit = true;
         var t;
         var args = behaviors[behavior] ? [behaviors[behavior]] : [];
@@ -338,7 +338,7 @@ describe('options', function () {
           // this is the only way to kill the child, afaik.
           // after the process ends, the callback to `run()` above is handled.
           mocha.kill('SIGINT');
-        }, 2000);
+        }, 4000);
       };
     };
 
diff --git a/test/integration/regression.spec.js b/test/integration/regression.spec.js
index 1c0466b1..bb553a8e 100644
--- a/test/integration/regression.spec.js
+++ b/test/integration/regression.spec.js
@@ -91,7 +91,7 @@ describe('regressions', function () {
   });
 
   it('issue-2406: should run nested describe.only suites', function (done) {
-    this.timeout(2000);
+    this.timeout(8000);
     runJSON('regression/issue-2406.fixture.js', [], function (err, res) {
       if (err) {
         done(err);
diff --git a/test/integration/suite.spec.js b/test/integration/suite.spec.js
index 4af47697..128cacf5 100644
--- a/test/integration/suite.spec.js
+++ b/test/integration/suite.spec.js
@@ -5,7 +5,7 @@ var run = require('./helpers').runMocha;
 var args = [];
 
 describe('suite w/no callback', function () {
-  this.timeout(2000);
+  this.timeout(5000);
   it('should throw a helpful error message when a callback for suite is not supplied', function (done) {
     run('suite/suite-no-callback.fixture.js', args, function (err, res) {
       if (err) {
@@ -20,7 +20,7 @@ describe('suite w/no callback', function () {
 });
 
 describe('skipped suite w/no callback', function () {
-  this.timeout(2000);
+  this.timeout(5000);
   it('should not throw an error when a callback for skipped suite is not supplied', function (done) {
     run('suite/suite-skipped-no-callback.fixture.js', args, function (err, res) {
       if (err) {
@@ -36,7 +36,7 @@ describe('skipped suite w/no callback', function () {
 });
 
 describe('skipped suite w/ callback', function () {
-  this.timeout(2000);
+  this.timeout(5000);
   it('should not throw an error when a callback for skipped suite is supplied', function (done) {
     run('suite/suite-skipped-callback.fixture.js', args, function (err, res) {
       if (err) {
diff --git a/test/node-unit/color.spec.js b/test/node-unit/color.spec.js
index ab27d201..64169e06 100644
--- a/test/node-unit/color.spec.js
+++ b/test/node-unit/color.spec.js
@@ -5,7 +5,7 @@ var childProcess = require('child_process');
 var path = require('path');
 
 describe('Mocha', function () {
-  this.timeout(4000);
+  this.timeout(8000);
 
   it('should not output colors to pipe', function (cb) {
     var command = [path.join('bin', 'mocha'), '--grep', 'missing-test'];