Skip to content

Commit

Permalink
[8.x] Disable check_on_startup for KibanaUserRoleIntegTests (elastic#…
Browse files Browse the repository at this point in the history
…118428) (elastic#118532)

* Disable check_on_startup for KibanaUserRoleIntegTests (elastic#118428)

(cherry picked from commit c30ba12)

# Conflicts:
#	muted-tests.yml

* fixup! Unmute test
  • Loading branch information
jfreden authored and maxhniebergall committed Dec 16, 2024
1 parent c5ff5ea commit 5d74b4d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 0 additions & 6 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,6 @@ tests:
- class: org.elasticsearch.xpack.ml.integration.MlJobIT
method: testCantCreateJobWithSameID
issue: https://github.com/elastic/elasticsearch/issues/113581
- class: org.elasticsearch.integration.KibanaUserRoleIntegTests
method: testFieldMappings
issue: https://github.com/elastic/elasticsearch/issues/113592
- class: org.elasticsearch.integration.KibanaUserRoleIntegTests
method: testSearchAndMSearch
issue: https://github.com/elastic/elasticsearch/issues/113593
- class: org.elasticsearch.xpack.transform.integration.TransformIT
method: testStopWaitForCheckpoint
issue: https://github.com/elastic/elasticsearch/issues/106113
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@
import org.elasticsearch.action.search.MultiSearchResponse;
import org.elasticsearch.cluster.metadata.MappingMetadata;
import org.elasticsearch.common.settings.SecureString;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.core.Strings;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.test.NativeRealmIntegTestCase;
import org.elasticsearch.test.SecuritySettingsSourceField;
import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken;

import java.util.Map;
import java.util.Random;

import static java.util.Collections.singletonMap;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertResponse;
Expand Down Expand Up @@ -60,6 +63,14 @@ public String configUsersRoles() {
return super.configUsersRoles() + "my_kibana_user:kibana_user\n" + "kibana_user:kibana_user";
}

@Override
protected Settings.Builder setRandomIndexSettings(Random random, Settings.Builder builder) {
// Prevent INDEX_CHECK_ON_STARTUP as a random setting since it could result in indices being checked for corruption before opening.
// When corruption is detected, it will prevent the shard from being opened. This check is expensive in terms of CPU and memory
// usage and causes intermittent CI failures due to timeout.
return super.setRandomIndexSettings(random, builder).put(IndexSettings.INDEX_CHECK_ON_STARTUP.getKey(), false);
}

public void testFieldMappings() throws Exception {
final String index = "logstash-20-12-2015";
final String field = "foo";
Expand Down

0 comments on commit 5d74b4d

Please sign in to comment.