Skip to content

Commit

Permalink
[flaky on mki] Increase timeout for kibanaReportCompletion, add delay…
Browse files Browse the repository at this point in the history
… between report checks (#184508)
  • Loading branch information
Dosant authored Jun 2, 2024
1 parent 84a0ecf commit 2570872
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ export default function ({ getService }: FtrProviderContext) {
* Tests
*/
describe('Generate CSV from SearchSource', function () {
// 7 minutes timeout for each test in serverless
// This is because it may take up to 5 minutes to generate the CSV
// see kibanaReportCompletion config
this.timeout(7 * 60 * 1000);

beforeEach(async () => {
await kibanaServer.uiSettings.update({
'csv:quoteValues': true,
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test_serverless/shared/config.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export default async () => {
try: 120 * 1000,
waitFor: 20 * 1000,
esRequestTimeout: 30 * 1000,
kibanaReportCompletion: 80 * 1000,
kibanaReportCompletion: 300 * 1000,
kibanaStabilize: 15 * 1000,
navigateStatusPageCheck: 250,
waitForExists: 2500,
Expand Down
4 changes: 4 additions & 0 deletions x-pack/test_serverless/shared/services/svl_reporting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ export function SvlReportingServiceProvider({ getService }: FtrProviderContext)

if (response.status === 503) {
log.debug(`Report at path ${downloadReportPath} is pending`);

// add a delay before retrying
await new Promise((resolve) => setTimeout(resolve, 2500));

return false;
}

Expand Down

0 comments on commit 2570872

Please sign in to comment.