Open
Description
Running the following test locally produces trace.zip that does not contain timeout error:
test('should stop tracing on requestContext.dispose()', async ({ runInlineTest, server }) => {
server.setRoute('/slow', (req, resp) => {
resp.writeHead(200, {
'Content-Type': 'text/plain; charset=utf-8',
'Content-Length': '3',
});
});
const result = await runInlineTest({
'playwright.config.ts': `
module.exports = {
reporter: [['html', { open: 'never' }]],
use: {
browserName: 'firefox',
trace:'retain-on-failure'
}
};
`,
'a.test.ts': `
import { test, expect } from '@playwright/test';
test('hanging request', async ({ page, request }) => {
const response = await page.goto('${server.EMPTY_PAGE}');
expect(response.status()).toBe(200);
await request.get('${server.PREFIX}/slow');
});
`,
}, { workers: 1, timeout: 1000 });
expect(result.output).not.toContain('ENOENT');
expect(result.exitCode).toBe(1);
expect(result.failed).toBe(1);
});
Also some of the test steps are displayed after After Hooks
:
