Skip to content

Commit

Permalink
Reenable Rollup Jobs API test that was failing due to interval change…
Browse files Browse the repository at this point in the history
… in ES. (#36310) (#36387)
  • Loading branch information
cjcenizal authored May 20, 2019
1 parent 3bb33c0 commit 1bdb1b9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion x-pack/plugins/rollup/public/crud_app/services/jobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ export function deserializeJob(job) {
metrics,
groups: {
date_histogram: {
interval: dateHistogramInterval,
interval,
fixed_interval: fixedInterval,
calendar_interval: calendarInterval,
delay: rollupDelay,
time_zone: dateHistogramTimeZone,
field: dateHistogramField,
Expand All @@ -108,6 +110,10 @@ export function deserializeJob(job) {

const json = job;

// `interval` is deprecated but still supported. All three of the various interval types are
// mutually exclusive.
const dateHistogramInterval = interval || fixedInterval || calendarInterval;

const deserializedJob = {
id,
indexPattern,
Expand Down
6 changes: 5 additions & 1 deletion x-pack/test/api_integration/apis/management/rollup/rollup.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ export default function ({ getService }) {
'testCreatedField': {
'agg': 'date_histogram',
'delay': '1d',
'interval': '24h',
// TODO: Note that we created the job with `interval`, but ES has coerced this to
// `fixed_interval` based on the value we provided. Once we update the UI and
// tests to no longer use the deprecated `interval` property, we can remove
// this comment.
'fixed_interval': '24h',
'time_zone': 'UTC'
}
},
Expand Down

0 comments on commit 1bdb1b9

Please sign in to comment.