Skip to content

Commit 844367a

Browse files
Fix MergeWithLowDiskSpaceIT testRelocationWhileForceMerging (#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 11c965e commit 844367a

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
@@ -282,7 +282,10 @@ public void testRelocationWhileForceMerging() throws Exception {
282282
ensureStableCluster(1);
283283
setTotalSpace(node1, Long.MAX_VALUE);
284284
String indexName = randomAlphaOfLength(10).toLowerCase(Locale.ROOT);
285-
prepareCreate(indexName, indexSettings(1, 0)).get();
285+
createIndex(
286+
indexName,
287+
Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0).put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1).build()
288+
);
286289
// get current disk space usage (for all indices on the node)
287290
IndicesStatsResponse stats = indicesAdmin().prepareStats().clear().setStore(true).get();
288291
long usedDiskSpaceAfterIndexing = stats.getTotal().getStore().sizeInBytes();

0 commit comments

Comments
 (0)