Skip to content

Commit f9c7fd6

Browse files
[8.19] fix(slo): purge data test (elastic#219389) (elastic#219416)
# Backport This will backport the following commits from `main` to `8.19`: - [fix(slo): purge data test (elastic#219389)](elastic#219389) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Kevin Delemme","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-04-28T14:53:20Z","message":"fix(slo): purge data test (elastic#219389)\n\n## Summary\n\nThis PR addresses an issue with date handling that could lead to\nmiscalculations in scenarios involving calendar-based SLOs.","sha":"b5d7ac0c4b8693fce1a95a84a1594b57f9ca2593","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-management","backport:version","v9.1.0","v8.19.0"],"title":"fix(slo): purge data test","number":219389,"url":"https://github.com/elastic/kibana/pull/219389","mergeCommit":{"message":"fix(slo): purge data test (elastic#219389)\n\n## Summary\n\nThis PR addresses an issue with date handling that could lead to\nmiscalculations in scenarios involving calendar-based SLOs.","sha":"b5d7ac0c4b8693fce1a95a84a1594b57f9ca2593"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/219389","number":219389,"mergeCommit":{"message":"fix(slo): purge data test (elastic#219389)\n\n## Summary\n\nThis PR addresses an issue with date handling that could lead to\nmiscalculations in scenarios involving calendar-based SLOs.","sha":"b5d7ac0c4b8693fce1a95a84a1594b57f9ca2593"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Kevin Delemme <[email protected]>
1 parent 60e66d0 commit f9c7fd6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

x-pack/solutions/observability/plugins/slo/server/services/purge_rollup_data.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ describe('purge rollup data', () => {
1919
let mockEsClient: jest.Mocked<ElasticsearchClient>;
2020
let purgeRollupData: BulkPurgeRollupData;
2121

22+
jest.useFakeTimers().setSystemTime(new Date('2025-04-24'));
23+
2224
beforeEach(() => {
2325
mockRepository = createSLORepositoryMock();
2426
mockEsClient = elasticsearchServiceMock.createElasticsearchClient();

0 commit comments

Comments
 (0)