mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test: unflake "should give enough time for fixture teardown" (#22763)
This commit is contained in:
parent
5e02022dff
commit
dee0f2791e
@ -415,19 +415,19 @@ test('should give enough time for fixture teardown', async ({ runInlineTest }) =
|
||||
fixture: async ({ }, use) => {
|
||||
await use();
|
||||
console.log('\\n%%teardown start');
|
||||
await new Promise(f => setTimeout(f, 800));
|
||||
await new Promise(f => setTimeout(f, 2000));
|
||||
console.log('\\n%%teardown finished');
|
||||
},
|
||||
});
|
||||
test('fast enough but close', async ({ fixture }) => {
|
||||
test.setTimeout(1000);
|
||||
await new Promise(f => setTimeout(f, 800));
|
||||
test.setTimeout(3000);
|
||||
await new Promise(f => setTimeout(f, 2000));
|
||||
});
|
||||
`,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.failed).toBe(1);
|
||||
expect(result.output).toContain('Test finished within timeout of 1000ms, but tearing down "fixture" ran out of time.');
|
||||
expect(result.output).toContain('Test finished within timeout of 3000ms, but tearing down "fixture" ran out of time.');
|
||||
expect(result.outputLines).toEqual([
|
||||
'teardown start',
|
||||
'teardown finished',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user