test: unflake "should stop tracing on requestContext.dispose()" (#23489)

Use Chromium instead of Firefox as it navigates faster and remove
timeout from the slow request handler, just make it hang.

Fixes #23116
This commit is contained in:
Yury Semikhatsky 2023-06-02 16:37:50 -07:00 committed by GitHub
parent e4a1273afa
commit 9cd49d5dd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,16 +57,12 @@ test('should stop tracing on requestContext.dispose()', async ({ runInlineTest,
'Content-Type': 'text/plain; charset=utf-8', 'Content-Type': 'text/plain; charset=utf-8',
'Content-Length': '3', 'Content-Length': '3',
}); });
setTimeout(() => {
resp.end('Hi!');
}, 5000);
}); });
const result = await runInlineTest({ const result = await runInlineTest({
'playwright.config.ts': ` 'playwright.config.ts': `
module.exports = { module.exports = {
reporter: [['html', { open: 'never' }]], reporter: [['html', { open: 'never' }]],
use: { use: {
browserName: 'firefox',
trace:'retain-on-failure' trace:'retain-on-failure'
} }
}; };
@ -79,7 +75,7 @@ test('should stop tracing on requestContext.dispose()', async ({ runInlineTest,
await request.get('${server.PREFIX}/slow'); await request.get('${server.PREFIX}/slow');
}); });
`, `,
}, { workers: 1, timeout: 3000 }); }, { workers: 1, timeout: 2000 });
expect(result.output).not.toContain('ENOENT'); expect(result.output).not.toContain('ENOENT');
expect(result.exitCode).toBe(1); expect(result.exitCode).toBe(1);
expect(result.failed).toBe(1); expect(result.failed).toBe(1);