Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ tests:
- class: org.elasticsearch.xpack.searchablesnapshots.cache.common.CacheFileTests
method: testCacheFileCreatedAsSparseFile
issue: https://github.com/elastic/elasticsearch/issues/110801
- class: org.elasticsearch.upgrades.FileSettingsUpgradeIT
issue: https://github.com/elastic/elasticsearch/issues/110884
- class: "org.elasticsearch.xpack.watcher.test.integration.HistoryIntegrationTests"
issue: "https://github.com/elastic/elasticsearch/issues/110885"
method: "testPayloadInputWithDotsInFieldNameWorks"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
import org.elasticsearch.core.SuppressForbidden;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.DefaultLocalClusterSpecBuilder;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.cluster.util.Version;
import org.elasticsearch.test.cluster.util.resource.Resource;
import org.junit.BeforeClass;
import org.elasticsearch.test.junit.RunnableTestRuleAdapter;
import org.junit.ClassRule;
import org.junit.rules.RuleChain;
import org.junit.rules.TemporaryFolder;
Expand All @@ -33,10 +32,9 @@

public class FileSettingsUpgradeIT extends ParameterizedRollingUpgradeTestCase {

@BeforeClass
public static void checkVersion() {
assumeTrue("Only valid when upgrading from pre-file settings", getOldClusterTestVersion().before(new Version(8, 4, 0)));
}
private static final RunnableTestRuleAdapter versionLimit = new RunnableTestRuleAdapter(
() -> assumeTrue("Only valid when upgrading from pre-file settings", getOldClusterTestVersion().before(new Version(8, 4, 0)))
);

private static final String settingsJSON = """
{
Expand All @@ -53,7 +51,8 @@ public static void checkVersion() {

private static final TemporaryFolder repoDirectory = new TemporaryFolder();

private static final ElasticsearchCluster cluster = new DefaultLocalClusterSpecBuilder().distribution(DistributionType.DEFAULT)
private static final ElasticsearchCluster cluster = ElasticsearchCluster.local()
.distribution(DistributionType.DEFAULT)
.version(getOldClusterTestVersion())
.nodes(NODE_NUM)
.setting("path.repo", new Supplier<>() {
Expand All @@ -69,7 +68,7 @@ public String get() {
.build();

@ClassRule
public static TestRule ruleChain = RuleChain.outerRule(repoDirectory).around(cluster);
public static TestRule ruleChain = RuleChain.outerRule(versionLimit).around(repoDirectory).around(cluster);

public FileSettingsUpgradeIT(@Name("upgradedNodes") int upgradedNodes) {
super(upgradedNodes);
Expand Down