Skip to content

Commit 23c5d51

Browse files
committed
Reduce timeouts where possible.
1 parent 04a03b1 commit 23c5d51

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

test/catchingErrors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var TIMEOUT = require('./constants');
99

1010
describe('when server responds with an error', function () {
1111

12-
this.timeout(TIMEOUT.STANDARD);
12+
this.timeout(TIMEOUT.QUICK);
1313

1414
var app;
1515
var slowTarget;

test/constants.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use strict';
2+
3+
/**
4+
* Test timeout constants in milliseconds
5+
*/
6+
module.exports = {
7+
// Standard timeout for most tests
8+
STANDARD: 10000,
9+
10+
// Shorter timeout for quick tests
11+
QUICK: 2000,
12+
13+
// Medium timeout for tests that need a bit more time
14+
MEDIUM: 3000,
15+
16+
// Extended timeout for tests that need more time
17+
EXTENDED: 15000
18+
};

test/getBody.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function createLocalApplicationServer() {
1616
}
1717

1818
describe('when proxy request is a GET', function () {
19-
this.timeout(TIMEOUT.STANDARD);
19+
this.timeout(TIMEOUT.QUICK);
2020

2121
var localServer;
2222

test/https.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var proxyTarget = require('./support/proxyTarget');
88
var TIMEOUT = require('./constants');
99

1010
describe('proxies https', function () {
11-
this.timeout(TIMEOUT.STANDARD);
11+
this.timeout(TIMEOUT.QUICK);
1212

1313
var app;
1414
var proxyServer;

test/userResDecorator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var proxyTarget = require('./support/proxyTarget');
88
var TIMEOUT = require('./constants');
99

1010
describe('userResDecorator', function () {
11-
this.timeout(TIMEOUT.STANDARD);
11+
this.timeout(TIMEOUT.QUICK);
1212
var proxyServer;
1313

1414
beforeEach(function () {

0 commit comments

Comments
 (0)