Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: give more time to polling matchers to print friendly error (#26595)

Pavel Feldmanafc5ebe07565
diff --git a/packages/playwright-test/src/worker/testInfo.ts b/packages/playwright-test/src/worker/testInfo.ts
index e93ec5bc2b..3a9d6d8893 100644
--- a/packages/playwright-test/src/worker/testInfo.ts
+++ b/packages/playwright-test/src/worker/testInfo.ts
@@ -110,7 +110,7 @@ export class TestInfoImpl implements TestInfo {
_deadlineForMatcher(timeout: number): { deadline: number, timeoutMessage: string } {
const startTime = monotonicTime();
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 testMessage = `Test timeout of ${this.timeout}ms exceeded`;
return { deadline: Math.min(testDeadline, matcherDeadline), timeoutMessage: testDeadline < matcherDeadline ? testMessage : matcherMessage };