From 612dcda8ae05c71a427a0f6e192e5c93301e14af Mon Sep 17 00:00:00 2001 From: Dimitrios Athanasiou Date: Tue, 25 Apr 2017 15:32:44 +0100 Subject: [PATCH] [TEST] Increase base job bucket_span to 1h The DatafeedJobsIT.testRealtime test fails from time to time. The test seems to take a long time to execute the flush action after the lookback. This could make sense as the test produces a few records over the span of a week with 5 minutes bucket_span. Thus, flush will end up doing a lot of word to create results for so many buckets. This change increases the bucket_span to 1 hour. Hopefully, this will stop the failures. Relates elastic/x-pack-elasticsearch#1162 Original commit: elastic/x-pack-elasticsearch@4366907371c22cb7a253207b63bb9eb9c4e866ab --- .../org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java index fe940a81b78..400ef0c5c0e 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java @@ -154,6 +154,7 @@ public abstract class BaseMlIntegTestCase extends ESIntegTestCase { Detector.Builder d = new Detector.Builder("count", null); AnalysisConfig.Builder analysisConfig = new AnalysisConfig.Builder(Collections.singletonList(d.build())); + analysisConfig.setBucketSpan(TimeValue.timeValueHours(1)); Job.Builder builder = new Job.Builder(); builder.setId(jobId);