Skip to content

Commit 0fe6568

Browse files
committed
[Uptime] Mock implementation to account for math flakiness test (elastic#83535)
1 parent 112e3c7 commit 0fe6568

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

x-pack/plugins/uptime/server/lib/requests/__tests__/get_ping_histogram.test.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
import { getPingHistogram } from '../get_ping_histogram';
88
import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../../common/constants';
99
import { elasticsearchServiceMock } from '../../../../../../../src/core/server/mocks';
10+
import * as intervalHelper from '../../helper/get_histogram_interval';
1011

1112
describe('getPingHistogram', () => {
13+
beforeEach(() => {
14+
jest.spyOn(intervalHelper, 'getHistogramInterval').mockReturnValue(36000);
15+
});
16+
1217
const standardMockResponse: any = {
1318
aggregations: {
1419
timeseries: {
@@ -36,7 +41,7 @@ describe('getPingHistogram', () => {
3641
},
3742
};
3843

39-
it.skip('returns a single bucket if array has 1', async () => {
44+
it('returns a single bucket if array has 1', async () => {
4045
expect.assertions(2);
4146
const mockEsClient = elasticsearchServiceMock.createElasticsearchClient();
4247

0 commit comments

Comments
 (0)