Skip to content

Commit

Permalink
Remove flakey assertion in SearchTimeoutIT
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Deng <[email protected]>
  • Loading branch information
jed326 authored and Jay Deng committed Jul 25, 2023
1 parent a3baa68 commit 9ad75df
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,12 @@ public void testSimpleTimeout() throws Exception {
refresh("test");

SearchResponse searchResponse = client().prepareSearch("test")
.setTimeout(new TimeValue(5, TimeUnit.MILLISECONDS))
.setTimeout(new TimeValue(50, TimeUnit.MILLISECONDS))
.setQuery(scriptQuery(new Script(ScriptType.INLINE, "mockscript", SCRIPT_NAME, Collections.emptyMap())))
.setAllowPartialSearchResults(true)
.get();
assertTrue(searchResponse.isTimedOut());
assertEquals(0, searchResponse.getFailedShards());
assertTrue(numDocs > searchResponse.getHits().getTotalHits().value);
}

public void testSimpleDoesNotTimeout() throws Exception {
Expand Down

0 comments on commit 9ad75df

Please sign in to comment.