Skip to content

Commit 776d370

Browse files
committed
Fix timeout tests
1 parent c2991f7 commit 776d370

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

test/cli/run-options.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ describe('CLI run options', function () {
112112
describe('script timeouts', function () {
113113
it('should be handled correctly when breached', function (done) {
114114
// eslint-disable-next-line max-len
115-
exec('node ./bin/newman.js run test/integration/timeout/timeout.postman_collection.json --timeout-script 100', function (code) {
115+
exec('node ./bin/newman.js run test/integration/timeout/timeout.postman_collection.json --timeout-script 5', function (code) {
116116
// .to.be.(1) is not used as the windows exit code can be an arbitrary non-zero value
117117
expect(code, 'should have non-zero exit code').to.be.above(0);
118118
done();
@@ -121,7 +121,7 @@ describe('CLI run options', function () {
121121

122122
it('should be handled correctly when not breached', function (done) {
123123
// eslint-disable-next-line max-len
124-
exec('node ./bin/newman.js run test/integration/timeout/timeout.postman_collection.json --timeout-script 800', function (code) {
124+
exec('node ./bin/newman.js run test/integration/timeout/timeout.postman_collection.json --timeout-script 500', function (code) {
125125
expect(code, 'should have exit code of 0').to.equal(0);
126126
done();
127127
});

test/integration/timeout/timeout.postman_collection.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "text/javascript",
77
"exec": [
88
"var now = Date.now(),",
9-
" later = now + 700;",
9+
" later = now + 300;",
1010
"while(Date.now() < later);"
1111
]
1212
}

test/library/run-options.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ describe('Newman run options', function () {
225225
it('should be handled correctly when breached', function (done) {
226226
newman.run({
227227
collection: 'test/integration/timeout/timeout.postman_collection.json',
228-
timeout: 100
228+
timeout: 1000
229229
}, function (err, summary) {
230230
expect(err.message).to.equal('callback timed out');
231231
expect(summary).to.be.ok;

0 commit comments

Comments
 (0)