diff --git a/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java b/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java index 7cf36b6ebcc1d..6fd362a41e003 100644 --- a/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java +++ b/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java @@ -151,7 +151,7 @@ public void testStarTreeKeywordDocValuesWithDeletions() throws IOException { for (int iter = 0; iter < iterations; iter++) { // Add 10 documents for (int i = 0; i < 10; i++) { - String id = String.valueOf(allIds.size() + 1); + String id = String.valueOf(random().nextInt() + 1); allIds.add(id); Document doc = new Document(); doc.add(new StringField("_id", id, Field.Store.YES));