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

[8.x] Fixes flaky backfill tests. (#198592) #199309

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,11 @@ export default function apiKeyBackfillTests({ getService }: FtrProviderContext)
}
});

// invoke the invalidate task
await runInvalidateTask();

// pending API key should now be deleted because backfill is done
await retry.try(async () => {
// invoke the invalidate task
await runInvalidateTask();

const results = await getApiKeysPendingInvalidation();
expect(results.length).to.eql(0);
return results;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext
});

it('should handle schedule request where some requests succeed and some requests fail appropriately', async () => {
const start = moment().utc().startOf('day').subtract(7, 'days').toISOString();
const start = moment().utc().startOf('day').subtract(14, 'days').toISOString();
const end = moment().utc().startOf('day').subtract(5, 'days').toISOString();
// create 2 rules
const rresponse1 = await supertest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export default function createBackfillTaskRunnerTests({ getService }: FtrProvide
objectRemover.add(spaceId, ruleId, 'rule', 'alerting');

const start = moment(originalDocTimestamps[1]).utc().startOf('day').toISOString();
const end = moment().utc().startOf('day').subtract(9, 'days').toISOString();
const end = moment(originalDocTimestamps[11]).utc().startOf('day').toISOString();

// Schedule backfill for this rule
const response2 = await supertestWithoutAuth
Expand Down