From 9ad75dfa271e8caf36cfa6039790dc54380bc8a2 Mon Sep 17 00:00:00 2001 From: Jay Deng Date: Mon, 24 Jul 2023 18:15:12 -0700 Subject: [PATCH] Remove flakey assertion in SearchTimeoutIT Signed-off-by: Jay Deng --- .../java/org/opensearch/search/SearchTimeoutIT.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/internalClusterTest/java/org/opensearch/search/SearchTimeoutIT.java b/server/src/internalClusterTest/java/org/opensearch/search/SearchTimeoutIT.java index c7392b260319a..ceae0b9ce3577 100644 --- a/server/src/internalClusterTest/java/org/opensearch/search/SearchTimeoutIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/SearchTimeoutIT.java @@ -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 {