diff --git a/muted-tests.yml b/muted-tests.yml index 2cf2c9d08f51b..9644e3c6179da 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -173,9 +173,6 @@ tests: - class: org.elasticsearch.packaging.test.DockerTests method: test140CgroupOsStatsAreAvailable issue: https://github.com/elastic/elasticsearch/issues/120914 -- class: org.elasticsearch.xpack.security.FileSettingsRoleMappingsRestartIT - method: testReservedStatePersistsOnRestart - issue: https://github.com/elastic/elasticsearch/issues/120923 - class: org.elasticsearch.packaging.test.DockerTests method: test070BindMountCustomPathConfAndJvmOptions issue: https://github.com/elastic/elasticsearch/issues/120910 @@ -191,9 +188,6 @@ tests: - class: org.elasticsearch.xpack.shutdown.AllocationFailuresResetOnShutdownIT method: testResetAllocationFailuresOnNodeShutdown issue: https://github.com/elastic/elasticsearch/issues/121129 -- class: org.elasticsearch.xpack.security.FileSettingsRoleMappingsRestartIT - method: testFileSettingsReprocessedOnRestartWithoutVersionChange - issue: https://github.com/elastic/elasticsearch/issues/120964 - class: org.elasticsearch.xpack.ml.integration.PyTorchModelIT issue: https://github.com/elastic/elasticsearch/issues/121165 - class: org.elasticsearch.xpack.test.rest.XPackRestIT @@ -329,4 +323,4 @@ tests: # issue: "https://github.com/elastic/elasticsearch/..." # - class: "org.elasticsearch.xpack.esql.**" # method: "test {union_types.MultiIndexIpStringStatsInline *}" -# issue: "https://github.com/elastic/elasticsearch/..." +# issue: "https://github.com/elastic/elasticsearch/..." \ No newline at end of file diff --git a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/FileSettingsRoleMappingsRestartIT.java b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/FileSettingsRoleMappingsRestartIT.java index ef8f2cfc0d411..83022a095869d 100644 --- a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/FileSettingsRoleMappingsRestartIT.java +++ b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/FileSettingsRoleMappingsRestartIT.java @@ -10,6 +10,7 @@ import org.apache.lucene.tests.util.LuceneTestCase; import org.elasticsearch.action.admin.cluster.state.ClusterStateRequest; import org.elasticsearch.cluster.ClusterState; +import org.elasticsearch.common.Priority; import org.elasticsearch.core.Tuple; import org.elasticsearch.integration.RoleMappingFileSettingsIT; import org.elasticsearch.reservedstate.service.FileSettingsService; @@ -112,7 +113,8 @@ public void resetVersion() { public void testReservedStatePersistsOnRestart() throws Exception { internalCluster().setBootstrapMasterNodeIndex(0); - final String masterNode = internalCluster().getMasterName(); + final String masterNode = internalCluster().startMasterOnlyNode(); + awaitMasterNode(); var savedClusterState = setupClusterStateListener(masterNode, "everyone_kibana_alone"); awaitFileSettingsWatcher(); @@ -192,7 +194,8 @@ public void testReservedStatePersistsOnRestart() throws Exception { public void testFileSettingsReprocessedOnRestartWithoutVersionChange() throws Exception { internalCluster().setBootstrapMasterNodeIndex(0); - final String masterNode = internalCluster().getMasterName(); + final String masterNode = internalCluster().startMasterOnlyNode(); + awaitMasterNode(); Tuple savedClusterState = setupClusterStateListener(masterNode, "everyone_kibana_alone"); awaitFileSettingsWatcher(); @@ -316,4 +319,8 @@ private void awaitFileSettingsWatcher() throws Exception { FileSettingsService masterFileSettingsService = internalCluster().getInstance(FileSettingsService.class, masterNode); assertBusy(() -> assertTrue(masterFileSettingsService.watching())); } + + public void awaitMasterNode() { + clusterAdmin().prepareHealth(TEST_REQUEST_TIMEOUT).setTimeout(TEST_REQUEST_TIMEOUT).setWaitForEvents(Priority.LANGUID).get(); + } }