Skip to content

Commit

Permalink
Fix SimpleNestedIT.testExplain flaky test
Browse files Browse the repository at this point in the history
Signed-off-by: Neetika Singhal <[email protected]>
  • Loading branch information
neetikasinghal committed Jan 8, 2024
1 parent c7196da commit 7c3df12
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,13 @@ public void testExplain() throws Exception {
)
.setRefreshPolicy(IMMEDIATE)
.get();

// refresh is important to enforce creation of a segment for document ingest above
// and prevent merging with deleted segemnts created by the index random function
// this ensures that the range doesnt change for the child docs asserted below
// ref: https://github.com/opensearch-project/OpenSearch/issues/11413
refresh("test");

indexRandomForConcurrentSearch("test");

SearchResponse searchResponse = client().prepareSearch("test")
Expand Down

0 comments on commit 7c3df12

Please sign in to comment.