Skip to content

Commit

Permalink
test(testrunner): fix the 'timeout: 0' test runner setting (puppeteer…
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov authored Dec 9, 2017
1 parent 391d1ab commit fc1f15e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions utils/testrunner/TestRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ class UserCallback {

async run(...args) {
const timeoutPromise = new Promise(resolve => {
if (!this.timeout)
return;
setTimeout(resolve.bind(null, TimeoutError), this.timeout);
});
try {
Expand Down Expand Up @@ -264,7 +262,8 @@ class TestRunner extends EventEmitter {
this._rootSuite = new Suite(null, '', TestMode.Run);
this._currentSuite = this._rootSuite;
this._tests = [];
this._timeout = options.timeout || 10 * 1000; // 10 seconds.
// Default timeout is 10 seconds.
this._timeout = options.timeout === 0 ? 2147483647 : options.timeout || 10 * 1000;
this._parallel = options.parallel || 1;
this._retryFailures = !!options.retryFailures;

Expand Down

0 comments on commit fc1f15e

Please sign in to comment.