Skip to content

Commit d773159

Browse files
committed
Fixed flaky test
1 parent 5a59591 commit d773159

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/library/run-options.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,9 @@ describe('Newman run options', function () {
203203
}, function (err, summary) {
204204
expect(err).to.be.null;
205205
expect(summary.run.failures).to.be.an('array').that.has.lengthOf(1);
206-
expect(summary.run.failures[0].error.message).to.equal('ESOCKETTIMEDOUT');
206+
// The timeout can happen before or after the connection has been established. Thus testing
207+
// for both 'ETIMEDOUT' and 'ESOCKETTIMEDOUT'
208+
expect(summary.run.failures[0].error.message).to.be.oneOf(['ETIMEDOUT', 'ESOCKETTIMEDOUT']);
207209
done();
208210
});
209211
});

0 commit comments

Comments
 (0)