Skip to content

Commit c6a0036

Browse files
Update IndicesRequestCacheIT.java
Signed-off-by: Kiran Prakash <awskiran@amazon.com>
1 parent 739e791 commit c6a0036

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

server/src/internalClusterTest/java/org/opensearch/indices/IndicesRequestCacheIT.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@
6565
import java.util.Collection;
6666
import java.util.List;
6767

68+
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS;
69+
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS;
6870
import static org.opensearch.indices.IndicesRequestCache.INDICES_REQUEST_CACHE_STALENESS_THRESHOLD_SETTING;
6971
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING;
7072
import static org.opensearch.search.aggregations.AggregationBuilders.dateHistogram;
@@ -104,7 +106,12 @@ public void testCacheAggs() throws Exception {
104106
.indices()
105107
.prepareCreate("index")
106108
.setMapping("f", "type=date")
107-
.setSettings(Settings.builder().put(IndicesRequestCache.INDEX_CACHE_REQUEST_ENABLED_SETTING.getKey(), true))
109+
.setSettings(
110+
Settings.builder()
111+
.put(IndicesRequestCache.INDEX_CACHE_REQUEST_ENABLED_SETTING.getKey(), true)
112+
.put(SETTING_NUMBER_OF_SHARDS, 1)
113+
.put(SETTING_NUMBER_OF_REPLICAS, 0)
114+
)
108115
.get()
109116
);
110117
indexRandom(

0 commit comments

Comments
 (0)