From 65bc7cd00fdb58a6bbe63b895e110b0828b95235 Mon Sep 17 00:00:00 2001 From: Sachin Kale Date: Mon, 4 Sep 2023 12:22:10 +0530 Subject: [PATCH] Fix FullRollingRestartIT Signed-off-by: Sachin Kale --- .../org/opensearch/recovery/FullRollingRestartIT.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/src/internalClusterTest/java/org/opensearch/recovery/FullRollingRestartIT.java b/server/src/internalClusterTest/java/org/opensearch/recovery/FullRollingRestartIT.java index 75fed2e500f7b..a22bc5f68bbaa 100644 --- a/server/src/internalClusterTest/java/org/opensearch/recovery/FullRollingRestartIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/recovery/FullRollingRestartIT.java @@ -72,7 +72,7 @@ public void testFullRollingRestart() throws Exception { final String healthTimeout = "1m"; - for (int i = 0; i < 1000; i++) { + for (int i = 0; i < 100; i++) { client().prepareIndex("test") .setId(Long.toString(i)) .setSource(MapBuilder.newMapBuilder().put("test", "value" + i).map()) @@ -80,7 +80,7 @@ public void testFullRollingRestart() throws Exception { .actionGet(); } flush(); - for (int i = 1000; i < 2000; i++) { + for (int i = 100; i < 200; i++) { client().prepareIndex("test") .setId(Long.toString(i)) .setSource(MapBuilder.newMapBuilder().put("test", "value" + i).map()) @@ -123,7 +123,7 @@ public void testFullRollingRestart() throws Exception { logger.info("--> refreshing and checking data"); refresh(); for (int i = 0; i < 10; i++) { - assertHitCount(client().prepareSearch().setPreference("_primary").setSize(0).setQuery(matchAllQuery()).get(), 2000L); + assertHitCount(client().prepareSearch().setPreference("_primary").setSize(0).setQuery(matchAllQuery()).get(), 200L); } // now start shutting nodes down @@ -156,7 +156,7 @@ public void testFullRollingRestart() throws Exception { logger.info("--> stopped two nodes, verifying data"); refresh(); for (int i = 0; i < 10; i++) { - assertHitCount(client().prepareSearch().setPreference("_primary").setSize(0).setQuery(matchAllQuery()).get(), 2000L); + assertHitCount(client().prepareSearch().setPreference("_primary").setSize(0).setQuery(matchAllQuery()).get(), 200L); } // closing the 3rd node @@ -190,7 +190,7 @@ public void testFullRollingRestart() throws Exception { logger.info("--> one node left, verifying data"); refresh(); for (int i = 0; i < 10; i++) { - assertHitCount(client().prepareSearch().setPreference("_primary").setSize(0).setQuery(matchAllQuery()).get(), 2000L); + assertHitCount(client().prepareSearch().setPreference("_primary").setSize(0).setQuery(matchAllQuery()).get(), 200L); } }