Fixing ReindexDataStreamStatusTests so that the in progress set max size is not less than min size (#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.
This commit is contained in:
Keith Massey 2024-12-18 08:56:39 -06:00 committed by GitHub
parent 1141edee47
commit e0f4b01fb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -74,7 +74,7 @@ public class ReindexDataStreamEnrichedStatusTests extends AbstractWireSerializin
}
private Set<String> randomSet(int minSize) {
return randomSet(minSize, 100, () -> randomAlphaOfLength(50));
return randomSet(minSize, Math.max(minSize, 100), () -> randomAlphaOfLength(50));
}
private List<Tuple<String, Exception>> randomErrorList() {

View file

@ -70,7 +70,7 @@ public class ReindexDataStreamStatusTests extends AbstractWireSerializingTestCas
}
private Set<String> randomSet(int minSize) {
return randomSet(minSize, 100, () -> randomAlphaOfLength(50));
return randomSet(minSize, Math.max(minSize, 100), () -> randomAlphaOfLength(50));
}
private List<Tuple<String, Exception>> randomErrorList() {