Skip to content

Commit fb79a04

Browse files
committed
Do not produce empty IDs in simple versioning test
Empty IDs are rejected during indexing, so we should not randomly produce them during tests. This commit modifies the simple versioning tests to no longer produce empty IDs.
1 parent 7363d90 commit fb79a04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ private IDSource getRandomIDs() {
358358
ids = new IDSource() {
359359
@Override
360360
public String next() {
361-
return TestUtil.randomSimpleString(random);
361+
return TestUtil.randomSimpleString(random, 1, 10);
362362
}
363363
};
364364
break;
@@ -368,7 +368,7 @@ public String next() {
368368
ids = new IDSource() {
369369
@Override
370370
public String next() {
371-
return TestUtil.randomRealisticUnicodeString(random);
371+
return TestUtil.randomRealisticUnicodeString(random, 1, 20);
372372
}
373373
};
374374
break;

0 commit comments

Comments
 (0)