Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay Single User Journey Finish #129991

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions x-pack/test/performance/services/performance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ export class PerformanceTestingService extends FtrService {

private async tearDown(page: Page, client: CDPSession, context: BrowserContext) {
if (page) {
// Journey is delayed to finish to guarantee all events reported properly to APM.
await page.waitForTimeout(5000);
apm.flush();
await client.detach();
Comment on lines 171 to 172
Copy link
Member

@dmlemeshko dmlemeshko Apr 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vigneshshanmugam suggested to add
await page.waitForResponse((response) => response.url().includes('/rum/events')); after flush() to make sure the RUM agent response is sent to APM server before browser is killed.

await page.close();
Expand Down