Skip to content

Commit a8168b3

Browse files
committed
Apply feedback
1 parent 3b14d4d commit a8168b3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/rollup/ConfigTestHelpers.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,6 @@ private static String randomField(final Random random) {
141141
}
142142

143143
private static long randomInterval(final Random random) {
144-
return RandomNumbers.randomLongBetween(random, 0L, Long.MAX_VALUE);
144+
return RandomNumbers.randomLongBetween(random, 1L, Long.MAX_VALUE);
145145
}
146146
}

x-pack/plugin/rollup/src/test/java/org/elasticsearch/xpack/rollup/job/IndexerUtilsTests.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import org.elasticsearch.xpack.core.rollup.RollupField;
3939
import org.elasticsearch.xpack.core.rollup.job.DateHistoGroupConfig;
4040
import org.elasticsearch.xpack.core.rollup.job.GroupConfig;
41+
import org.elasticsearch.xpack.core.rollup.job.HistogramGroupConfig;
4142
import org.elasticsearch.xpack.core.rollup.job.MetricConfig;
4243
import org.elasticsearch.xpack.core.rollup.job.RollupJobStats;
4344
import org.elasticsearch.xpack.core.rollup.job.TermsGroupConfig;
@@ -354,8 +355,10 @@ public void testKeyOrdering() {
354355
return foos;
355356
});
356357

358+
// The content of the config don't actually matter for this test
359+
// because the test is just looking at agg keys
357360
GroupConfig.Builder groupConfig = ConfigTestHelpers.getGroupConfig();
358-
groupConfig.setHisto(randomHistogramGroupConfig(random()));
361+
groupConfig.setHisto(new HistogramGroupConfig(123L, "abc"));
359362

360363
List<IndexRequest> docs = IndexerUtils.processBuckets(composite, "foo", new RollupJobStats(), groupConfig.build(), "foo");
361364
assertThat(docs.size(), equalTo(1));

0 commit comments

Comments
 (0)