Skip to content

Commit 1a3e115

Browse files
committed
fix config serialization tests
1 parent 20ea956 commit 1a3e115

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/rollup/v2/RollupV2Config.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public class RollupV2Config implements NamedWriteable, ToXContentObject {
5454
private static final ConstructingObjectParser<RollupV2Config, String> PARSER;
5555
static {
5656
PARSER = new ConstructingObjectParser<>(NAME, false, (args, sourceIndex) -> {
57-
// TODO(talevy): fix RollupV2Config to include the target index so that it can be completely read from XContent
5857
String rollupIndex = (String) args[0];
5958
GroupConfig groupConfig = (GroupConfig) args[1];
6059
@SuppressWarnings("unchecked")

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ void setUpSourceIndex() {
3333

3434
@Override
3535
protected RollupV2Config createTestInstance() {
36-
return randomConfig(random());
36+
return randomConfig(random(), sourceIndex);
3737
}
3838

39-
public static RollupV2Config randomConfig(Random random) {
40-
final String sourceIndex = randomAlphaOfLength(10);
39+
public static RollupV2Config randomConfig(Random random, String sourceIndex) {
4140
final String rollupIndex = "rollup-" + sourceIndex;
4241
final TimeValue timeout = random.nextBoolean() ? null : ConfigTestHelpers.randomTimeout(random);
4342
final GroupConfig groupConfig = ConfigTestHelpers.randomGroupConfig(random);

0 commit comments

Comments
 (0)