Attempt to fix flaky burn rate test (#212039)

Fixes #211439

## Summary

@simianhacker pointed out that the `alignEventsToInterval` setting
aligns the data generation so that we have the exact number of documents
in each bucket; I noticed this setting is missing for the burn rate rule
test.

### How to run the test

```
// Server
node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts

// Test
node scripts/functional_test_runner --config=x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts --grep="Burn rate rule"
```

Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
This commit is contained in:
Maryam Saeidi 2025-02-25 21:36:26 +01:00 committed by GitHub
parent 3b1c352df9
commit cb6e0be122
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,7 +53,12 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
],
},
],
indexing: { dataset: 'fake_hosts' as Dataset, eventsPerCycle: 1, interval: 10000 },
indexing: {
dataset: 'fake_hosts' as Dataset,
eventsPerCycle: 1,
interval: 10000,
alignEventsToInterval: true,
},
};
dataForgeIndices = await generate({ client: esClient, config: dataForgeConfig, logger });
await alertingApi.waitForDocumentInIndex({