diff --git a/bwc-test/src/test/java/org/opensearch/security/bwc/SecurityBackwardsCompatibilityIT.java b/bwc-test/src/test/java/org/opensearch/security/bwc/SecurityBackwardsCompatibilityIT.java index 9fe3bb1ef8..bd296fa90d 100644 --- a/bwc-test/src/test/java/org/opensearch/security/bwc/SecurityBackwardsCompatibilityIT.java +++ b/bwc-test/src/test/java/org/opensearch/security/bwc/SecurityBackwardsCompatibilityIT.java @@ -229,7 +229,8 @@ private void ingestData(String index) throws IOException { ObjectMapper objectMapper = new ObjectMapper(); int numberOfRequests = Randomness.get().nextInt(10); while (numberOfRequests-- > 0) { - for (int i = 0; i < Randomness.get().nextInt(100); i++) { + int numberOfDocuments = Randomness.get().nextInt(100) + 1; + for (int i = 0; i < numberOfDocuments; i++) { Map> indexRequest = new HashMap<>(); indexRequest.put("index", new HashMap<>() { {