diff --git a/server/src/test/java/org/elasticsearch/indices/state/CloseWhileRelocatingShardsIT.java b/server/src/test/java/org/elasticsearch/indices/state/CloseWhileRelocatingShardsIT.java index c549471074dfc..02484eb0de14d 100644 --- a/server/src/test/java/org/elasticsearch/indices/state/CloseWhileRelocatingShardsIT.java +++ b/server/src/test/java/org/elasticsearch/indices/state/CloseWhileRelocatingShardsIT.java @@ -65,7 +65,7 @@ protected int numberOfReplicas() { } public void testCloseWhileRelocatingShards() throws Exception { - final String[] indices = new String[randomIntBetween(3, 10)]; + final String[] indices = new String[randomIntBetween(1, 3)]; final Map docsPerIndex = new HashMap<>(); for (int i = 0; i < indices.length; i++) { @@ -93,7 +93,7 @@ public void testCloseWhileRelocatingShards() throws Exception { final Map indexers = new HashMap<>(); for (final String index : indices) { if (randomBoolean()) { - final BackgroundIndexer indexer = new BackgroundIndexer(index, "_doc", client()); + final BackgroundIndexer indexer = new BackgroundIndexer(index, "_doc", client(), -1, scaledRandomIntBetween(1, 3)); waitForDocs(1, indexer); indexers.put(index, indexer); }