Skip to content

Commit 8a2bc86

Browse files
committed
Update alerting tests to accommodate type updates
1 parent 555ba62 commit 8a2bc86

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

x-pack/plugins/task_manager/server/monitoring/workload_statistics.test.ts

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,13 @@ describe('Workload Statistics Aggregator', () => {
4646
aggregations: {
4747
taskType: {
4848
buckets: [],
49+
doc_count_error_upper_bound: 0,
50+
sum_other_doc_count: 0,
4951
},
5052
schedule: {
5153
buckets: [],
54+
doc_count_error_upper_bound: 0,
55+
sum_other_doc_count: 0,
5256
},
5357
idleTasks: {
5458
doc_count: 0,
@@ -158,6 +162,8 @@ describe('Workload Statistics Aggregator', () => {
158162
},
159163
aggregations: {
160164
schedule: {
165+
doc_count_error_upper_bound: 0,
166+
sum_other_doc_count: 0,
161167
buckets: [
162168
{
163169
key: '3600s',
@@ -174,11 +180,15 @@ describe('Workload Statistics Aggregator', () => {
174180
],
175181
},
176182
taskType: {
183+
doc_count_error_upper_bound: 0,
184+
sum_other_doc_count: 0,
177185
buckets: [
178186
{
179187
key: 'actions_telemetry',
180188
doc_count: 2,
181189
status: {
190+
doc_count_error_upper_bound: 0,
191+
sum_other_doc_count: 0,
182192
buckets: [
183193
{
184194
key: 'idle',
@@ -191,6 +201,8 @@ describe('Workload Statistics Aggregator', () => {
191201
key: 'alerting_telemetry',
192202
doc_count: 1,
193203
status: {
204+
doc_count_error_upper_bound: 0,
205+
sum_other_doc_count: 0,
194206
buckets: [
195207
{
196208
key: 'idle',
@@ -203,6 +215,8 @@ describe('Workload Statistics Aggregator', () => {
203215
key: 'session_cleanup',
204216
doc_count: 1,
205217
status: {
218+
doc_count_error_upper_bound: 0,
219+
sum_other_doc_count: 0,
206220
buckets: [
207221
{
208222
key: 'idle',
@@ -608,6 +622,7 @@ describe('padBuckets', () => {
608622
key: 1601668047000,
609623
doc_count: 1,
610624
interval: {
625+
doc_count_error_upper_bound: 0,
611626
sum_other_doc_count: 0,
612627
buckets: [],
613628
},
@@ -617,6 +632,7 @@ describe('padBuckets', () => {
617632
key: 1601668050000,
618633
doc_count: 1,
619634
interval: {
635+
doc_count_error_upper_bound: 0,
620636
sum_other_doc_count: 0,
621637
buckets: [],
622638
},
@@ -626,6 +642,7 @@ describe('padBuckets', () => {
626642
key: 1601668053000,
627643
doc_count: 0,
628644
interval: {
645+
doc_count_error_upper_bound: 0,
629646
sum_other_doc_count: 0,
630647
buckets: [],
631648
},
@@ -635,6 +652,7 @@ describe('padBuckets', () => {
635652
key: 1601668056000,
636653
doc_count: 0,
637654
interval: {
655+
doc_count_error_upper_bound: 0,
638656
sum_other_doc_count: 0,
639657
buckets: [],
640658
},
@@ -644,6 +662,7 @@ describe('padBuckets', () => {
644662
key: 1601668059000,
645663
doc_count: 0,
646664
interval: {
665+
doc_count_error_upper_bound: 0,
647666
sum_other_doc_count: 0,
648667
buckets: [],
649668
},
@@ -653,6 +672,7 @@ describe('padBuckets', () => {
653672
key: 1601668062000,
654673
doc_count: 1,
655674
interval: {
675+
doc_count_error_upper_bound: 0,
656676
sum_other_doc_count: 0,
657677
buckets: [],
658678
},
@@ -678,13 +698,13 @@ describe('padBuckets', () => {
678698
key_as_string: '2020-10-02T20:40:09.000Z',
679699
key: 1601671209000,
680700
doc_count: 1,
681-
interval: { buckets: [] },
701+
interval: { buckets: [], sum_other_doc_count: 0, doc_count_error_upper_bound: 0 },
682702
},
683703
{
684704
key_as_string: '2020-10-02T20:40:12.000Z',
685705
key: 1601671212000,
686706
doc_count: 1,
687-
interval: { buckets: [] },
707+
interval: { buckets: [], sum_other_doc_count: 0, doc_count_error_upper_bound: 0 },
688708
},
689709
],
690710
},
@@ -707,13 +727,13 @@ describe('padBuckets', () => {
707727
key_as_string: '2020-10-02T20:40:09.000Z',
708728
key: 1601671209000,
709729
doc_count: 1,
710-
interval: { buckets: [] },
730+
interval: { buckets: [], sum_other_doc_count: 0, doc_count_error_upper_bound: 0 },
711731
},
712732
{
713733
key_as_string: '2020-10-02T20:40:12.000Z',
714734
key: 1601671212000,
715735
doc_count: 1,
716-
interval: { buckets: [] },
736+
interval: { buckets: [], sum_other_doc_count: 0, doc_count_error_upper_bound: 0 },
717737
},
718738
],
719739
},
@@ -796,7 +816,7 @@ function mockHistogram(
796816
key_as_string: key.toISOString(),
797817
key: key.getTime(),
798818
doc_count: count,
799-
interval: { buckets: [] },
819+
interval: { buckets: [], doc_count_error_upper_bound: 0, sum_other_doc_count: 0 },
800820
});
801821
}
802822
return histogramBuckets;
@@ -806,6 +826,8 @@ function mockHistogram(
806826
key: number;
807827
doc_count: number;
808828
interval: {
829+
doc_count_error_upper_bound: number;
830+
sum_other_doc_count: number;
809831
buckets: Array<{
810832
key: string;
811833
doc_count: number;

0 commit comments

Comments
 (0)