Skip to content

[ML] Updating detectors should not affect existing job#32040

Merged
dimitris-athanasiou merged 2 commits intoelastic:6.3from
dimitris-athanasiou:updating-detectors-should-not-affect-existing-job
Jul 13, 2018
Merged

[ML] Updating detectors should not affect existing job#32040
dimitris-athanasiou merged 2 commits intoelastic:6.3from
dimitris-athanasiou:updating-detectors-should-not-affect-existing-job

Conversation

@dimitris-athanasiou
Copy link
Copy Markdown
Contributor

This is a light backport of #31957 for 6.3.

@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/ml-core

Copy link
Copy Markdown
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Job updatedJob = update.mergeWithJob(job, new ByteSizeValue(0L));

assertThat(updatedJob.getAnalysisConfig().getDetectors().get(0).getRules(), equalTo(rules));
assertThat(job.getAnalysisConfig().getDetectors().get(0).getRules().isEmpty(), is(true));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an empty() matcher - org.hamcrest.Matchers.empty

@dimitris-athanasiou dimitris-athanasiou merged commit eae6fed into elastic:6.3 Jul 13, 2018
@dimitris-athanasiou dimitris-athanasiou deleted the updating-detectors-should-not-affect-existing-job branch July 13, 2018 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants