Skip to content

Commit 6bf55e4

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 6932440 commit 6bf55e4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,6 @@ tests:
503503
- class: org.elasticsearch.indices.cluster.RemoteSearchForceConnectTimeoutIT
504504
method: testTimeoutSetting
505505
issue: https://github.com/elastic/elasticsearch/issues/131656
506-
- class: org.elasticsearch.index.engine.MergeWithLowDiskSpaceIT
507-
method: testRelocationWhileForceMerging
508-
issue: https://github.com/elastic/elasticsearch/issues/131789
509506
- class: org.elasticsearch.xpack.stack.StackYamlIT
510507
method: test {yaml=stack/10_basic/Test wrong data_stream type - logs from 9.2.0}
511508
issue: https://github.com/elastic/elasticsearch/issues/131803

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)