mirror of
https://github.com/microsoft/playwright.git
synced 2024-10-27 13:50:25 +03:00
chore: give more time to polling matchers to print friendly error (#26595)
This commit is contained in:
parent
cd07401d20
commit
afc5ebe075
@ -110,7 +110,7 @@ export class TestInfoImpl implements TestInfo {
|
|||||||
_deadlineForMatcher(timeout: number): { deadline: number, timeoutMessage: string } {
|
_deadlineForMatcher(timeout: number): { deadline: number, timeoutMessage: string } {
|
||||||
const startTime = monotonicTime();
|
const startTime = monotonicTime();
|
||||||
const matcherDeadline = timeout ? startTime + timeout : MaxTime;
|
const matcherDeadline = timeout ? startTime + timeout : MaxTime;
|
||||||
const testDeadline = this._timeoutManager.currentSlotDeadline() - 100;
|
const testDeadline = this._timeoutManager.currentSlotDeadline() - 250;
|
||||||
const matcherMessage = `Timeout ${timeout}ms exceeded while waiting on the predicate`;
|
const matcherMessage = `Timeout ${timeout}ms exceeded while waiting on the predicate`;
|
||||||
const testMessage = `Test timeout of ${this.timeout}ms exceeded`;
|
const testMessage = `Test timeout of ${this.timeout}ms exceeded`;
|
||||||
return { deadline: Math.min(testDeadline, matcherDeadline), timeoutMessage: testDeadline < matcherDeadline ? testMessage : matcherMessage };
|
return { deadline: Math.min(testDeadline, matcherDeadline), timeoutMessage: testDeadline < matcherDeadline ? testMessage : matcherMessage };
|
||||||
|
Loading…
Reference in New Issue
Block a user