mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
test(testrunner): fix the 'timeout: 0' test runner setting (#1561)
This commit is contained in:
parent
391d1abaa7
commit
fc1f15e251
@ -34,8 +34,6 @@ class UserCallback {
|
|||||||
|
|
||||||
async run(...args) {
|
async run(...args) {
|
||||||
const timeoutPromise = new Promise(resolve => {
|
const timeoutPromise = new Promise(resolve => {
|
||||||
if (!this.timeout)
|
|
||||||
return;
|
|
||||||
setTimeout(resolve.bind(null, TimeoutError), this.timeout);
|
setTimeout(resolve.bind(null, TimeoutError), this.timeout);
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
@ -264,7 +262,8 @@ class TestRunner extends EventEmitter {
|
|||||||
this._rootSuite = new Suite(null, '', TestMode.Run);
|
this._rootSuite = new Suite(null, '', TestMode.Run);
|
||||||
this._currentSuite = this._rootSuite;
|
this._currentSuite = this._rootSuite;
|
||||||
this._tests = [];
|
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._parallel = options.parallel || 1;
|
||||||
this._retryFailures = !!options.retryFailures;
|
this._retryFailures = !!options.retryFailures;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user