|
14 | 14 | import org.elasticsearch.action.search.MultiSearchResponse;
|
15 | 15 | import org.elasticsearch.cluster.metadata.MappingMetadata;
|
16 | 16 | import org.elasticsearch.common.settings.SecureString;
|
| 17 | +import org.elasticsearch.common.settings.Settings; |
17 | 18 | import org.elasticsearch.core.Strings;
|
| 19 | +import org.elasticsearch.index.IndexSettings; |
18 | 20 | import org.elasticsearch.index.query.QueryBuilders;
|
19 | 21 | import org.elasticsearch.test.NativeRealmIntegTestCase;
|
20 | 22 | import org.elasticsearch.test.SecuritySettingsSourceField;
|
21 | 23 | import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken;
|
22 | 24 |
|
23 | 25 | import java.util.Map;
|
| 26 | +import java.util.Random; |
24 | 27 |
|
25 | 28 | import static java.util.Collections.singletonMap;
|
26 | 29 | import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertResponse;
|
@@ -60,6 +63,14 @@ public String configUsersRoles() {
|
60 | 63 | return super.configUsersRoles() + "my_kibana_user:kibana_user\n" + "kibana_user:kibana_user";
|
61 | 64 | }
|
62 | 65 |
|
| 66 | + @Override |
| 67 | + protected Settings.Builder setRandomIndexSettings(Random random, Settings.Builder builder) { |
| 68 | + // Prevent INDEX_CHECK_ON_STARTUP as a random setting since it could result in indices being checked for corruption before opening. |
| 69 | + // When corruption is detected, it will prevent the shard from being opened. This check is expensive in terms of CPU and memory |
| 70 | + // usage and causes intermittent CI failures due to timeout. |
| 71 | + return super.setRandomIndexSettings(random, builder).put(IndexSettings.INDEX_CHECK_ON_STARTUP.getKey(), false); |
| 72 | + } |
| 73 | + |
63 | 74 | public void testFieldMappings() throws Exception {
|
64 | 75 | final String index = "logstash-20-12-2015";
|
65 | 76 | final String field = "foo";
|
|
0 commit comments