Skip to content

Commit

Permalink
[ML] Fix failing test DetectionRulesTests.testEqualsAndHashcode (elas…
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriy42 authored Jul 29, 2024
1 parent 1a939e9 commit 80d539d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ tests:
- class: org.elasticsearch.upgrades.LogsIndexModeFullClusterRestartIT
method: testLogsIndexing {cluster=UPGRADED}
issue: https://github.com/elastic/elasticsearch/issues/111306
- class: org.elasticsearch.xpack.core.ml.job.config.DetectionRuleTests
method: testEqualsAndHashcode
issue: https://github.com/elastic/elasticsearch/issues/111308
- class: org.elasticsearch.xpack.ml.integration.DatafeedJobsRestIT
issue: https://github.com/elastic/elasticsearch/issues/111319
- class: org.elasticsearch.xpack.esql.analysis.VerifierTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ protected DetectionRule mutateInstance(DetectionRule instance) {

if (actions.contains(RuleAction.FORCE_TIME_SHIFT) && params.getForceTimeShift() == null) {
params = new RuleParams(new RuleParamsForForceTimeShift(randomLong()));
} else if (actions.contains(RuleAction.FORCE_TIME_SHIFT) == false && params.getForceTimeShift() != null) {
params = new RuleParams();
}

return new DetectionRule.Builder(conditions).setActions(actions).setScope(scope).setParams(params).build();
Expand Down

0 comments on commit 80d539d

Please sign in to comment.