Skip to content

Commit 3c320b5

Browse files
Fix MergeWithLowDiskSpaceIT testRelocationWhileForceMerging (elastic#131806)
The index settings are randomized in the test, but this test suite doesn't work when indices have a custom data path.
1 parent 0613547 commit 3c320b5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/src/internalClusterTest/java/org/elasticsearch/index/engine/MergeWithLowDiskSpaceIT.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,10 @@ public void testRelocationWhileForceMerging() throws Exception {
251251
ensureStableCluster(1);
252252
setTotalSpace(node1, Long.MAX_VALUE);
253253
String indexName = randomAlphaOfLength(10).toLowerCase(Locale.ROOT);
254-
prepareCreate(indexName, indexSettings(1, 0)).get();
254+
createIndex(
255+
indexName,
256+
Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0).put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1).build()
257+
);
255258
// get current disk space usage (for all indices on the node)
256259
IndicesStatsResponse stats = indicesAdmin().prepareStats().clear().setStore(true).get();
257260
long usedDiskSpaceAfterIndexing = stats.getTotal().getStore().sizeInBytes();

0 commit comments

Comments
 (0)