Skip to content

Commit e0f4b01

Browse files
authored
Fixing ReindexDataStreamStatusTests so that the in progress set max size is not less than min size (elastic#118957)
It is currently possible when we mutate a status object that we ask for a random set for the inProgress field where the max size of the set is less than the min size. This fixes that.
1 parent 1141ede commit e0f4b01

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

x-pack/plugin/migrate/src/test/java/org/elasticsearch/xpack/migrate/task/ReindexDataStreamEnrichedStatusTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private List<String> randomList(int minSize) {
7474
}
7575

7676
private Set<String> randomSet(int minSize) {
77-
return randomSet(minSize, 100, () -> randomAlphaOfLength(50));
77+
return randomSet(minSize, Math.max(minSize, 100), () -> randomAlphaOfLength(50));
7878
}
7979

8080
private List<Tuple<String, Exception>> randomErrorList() {

x-pack/plugin/migrate/src/test/java/org/elasticsearch/xpack/migrate/task/ReindexDataStreamStatusTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private List<String> randomList(int minSize) {
7070
}
7171

7272
private Set<String> randomSet(int minSize) {
73-
return randomSet(minSize, 100, () -> randomAlphaOfLength(50));
73+
return randomSet(minSize, Math.max(minSize, 100), () -> randomAlphaOfLength(50));
7474
}
7575

7676
private List<Tuple<String, Exception>> randomErrorList() {

0 commit comments

Comments
 (0)