Skip to content

Commit 289ab04

Browse files
Fix disk usage integ tests (#94945)
Disk usage integ tests started failing after #93524, fixed to ignore translog when checking for tracked path. Also removed the linux only escape hatch, since the spinning disk detection was removed from lucene in LUCENE-9576. Closes #94935
1 parent 7e87a02 commit 289ab04

File tree

6 files changed

+3
-14
lines changed

6 files changed

+3
-14
lines changed

server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/DiskThresholdMonitorIT.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
package org.elasticsearch.cluster.routing.allocation;
1010

11-
import org.apache.lucene.tests.util.LuceneTestCase;
1211
import org.elasticsearch.cluster.DiskUsageIntegTestCase;
1312
import org.elasticsearch.cluster.metadata.IndexMetadata;
1413
import org.elasticsearch.cluster.routing.ShardRouting;
@@ -28,7 +27,6 @@
2827
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
2928
import static org.hamcrest.Matchers.equalTo;
3029

31-
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/94935")
3230
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
3331
public class DiskThresholdMonitorIT extends DiskUsageIntegTestCase {
3432

server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
package org.elasticsearch.cluster.routing.allocation.decider;
1010

11-
import org.apache.lucene.tests.util.LuceneTestCase;
1211
import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse;
1312
import org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse;
1413
import org.elasticsearch.action.admin.indices.stats.ShardStats;
@@ -54,7 +53,6 @@
5453
import static org.hamcrest.Matchers.equalTo;
5554
import static org.hamcrest.Matchers.is;
5655

57-
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/94935")
5856
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
5957
public class DiskThresholdDeciderIT extends DiskUsageIntegTestCase {
6058

test/framework/src/main/java/org/elasticsearch/cluster/DiskUsageIntegTestCase.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import org.apache.lucene.tests.mockfile.FilterFileStore;
1212
import org.apache.lucene.tests.mockfile.FilterFileSystemProvider;
1313
import org.apache.lucene.tests.mockfile.FilterPath;
14-
import org.apache.lucene.util.Constants;
1514
import org.elasticsearch.common.settings.Settings;
1615
import org.elasticsearch.core.IOUtils;
1716
import org.elasticsearch.core.PathUtils;
@@ -224,9 +223,9 @@ TestFileStore getTestFileStore(Path path) {
224223
return fileStore;
225224
}
226225

227-
// On Linux, and only Linux, Lucene obtains a filestore for the index in order to determine whether it's on a spinning disk or
228-
// not so it can configure the merge scheduler accordingly
229-
assertTrue(path + " not tracked and not on Linux", Constants.LINUX);
226+
// We check the total size available for translog in InternalEngine constructor and we allow that here,
227+
// expecting to match a unique root path.
228+
assertTrue(path + " not tracked and not translog", path.getFileName().toString().equals("translog"));
230229
final Set<Path> containingPaths = trackedPaths.keySet().stream().filter(path::startsWith).collect(Collectors.toSet());
231230
assertThat(path + " not contained in a unique tracked path", containingPaths, hasSize(1));
232231
return trackedPaths.get(containingPaths.iterator().next());

x-pack/plugin/autoscaling/src/internalClusterTest/java/org/elasticsearch/xpack/autoscaling/storage/ProactiveStorageIT.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
package org.elasticsearch.xpack.autoscaling.storage;
99

10-
import org.apache.lucene.tests.util.LuceneTestCase;
1110
import org.elasticsearch.action.admin.indices.rollover.RolloverRequest;
1211
import org.elasticsearch.action.admin.indices.stats.IndicesStatsResponse;
1312
import org.elasticsearch.action.admin.indices.template.put.PutComposableIndexTemplateAction;
@@ -36,7 +35,6 @@
3635

3736
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
3837

39-
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/94935")
4038
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
4139
public class ProactiveStorageIT extends AutoscalingStorageIntegTestCase {
4240

x-pack/plugin/autoscaling/src/internalClusterTest/java/org/elasticsearch/xpack/autoscaling/storage/ReactiveStorageIT.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
package org.elasticsearch.xpack.autoscaling.storage;
99

10-
import org.apache.lucene.tests.util.LuceneTestCase;
1110
import org.elasticsearch.action.admin.indices.shrink.ResizeType;
1211
import org.elasticsearch.action.admin.indices.stats.IndicesStatsResponse;
1312
import org.elasticsearch.action.index.IndexRequestBuilder;
@@ -44,7 +43,6 @@
4443
import static org.hamcrest.Matchers.is;
4544
import static org.hamcrest.Matchers.notNullValue;
4645

47-
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/94935")
4846
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
4947
public class ReactiveStorageIT extends AutoscalingStorageIntegTestCase {
5048

x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/allocation/SearchableSnapshotDiskThresholdIntegTests.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
package org.elasticsearch.xpack.searchablesnapshots.allocation;
99

10-
import org.apache.lucene.tests.util.LuceneTestCase;
1110
import org.elasticsearch.action.ActionListener;
1211
import org.elasticsearch.blobcache.shared.SharedBlobCacheService;
1312
import org.elasticsearch.cluster.ClusterInfoService;
@@ -71,7 +70,6 @@
7170
import static org.hamcrest.Matchers.equalTo;
7271
import static org.hamcrest.Matchers.is;
7372

74-
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/94935")
7573
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
7674
public class SearchableSnapshotDiskThresholdIntegTests extends DiskUsageIntegTestCase {
7775

0 commit comments

Comments
 (0)