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

[EDR Workflows][E2E] Increase the timeout of agent check in #168438

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ export const createEndpointHost = (
{
agentPolicyId,
},
{ timeout: timeout ?? 600000 }
{ timeout: timeout ?? 900000 } // 15 minutes, since setup can take 10 minutes and more. Task will time out if is not resolved within this time.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any other way to speed up this instead of increasing the timeout?

Copy link
Contributor Author

@szwarckonrad szwarckonrad Oct 11, 2023

Choose a reason for hiding this comment

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

I don't think so. If cypress task that set ups and enrols agent doesn't resolve within this timeout the task and test fails. We have noticed, that at some occurrences this 10 minutes is not enough to download, install, enroll and wait for agent to show up in fleet and test fails making it flaky not because of the test itself but this setup task. We could investigate a way to make this task faster or break it into several tasks but that should be a spike, this PR aims at stabilizing our test runs now.

);
};
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ const enrollHostWithFleet = async ({
]);
}
log.info(`Waiting for Agent to check-in with Fleet`);
const agent = await waitForHostToEnroll(kbnClient, vmName, 120000);
const agent = await waitForHostToEnroll(kbnClient, vmName, 240000);

return {
agentId: agent.id,
Expand Down
Loading