Skip to content

Commit 160faa2

Browse files
authored
Re-enable threadpool blocking in Kibana system index test (elastic#112569)
KibanaThreadPoolIT checks the Kibana system user can write (using the system read/write threadpools) even when the normal read/write threadpools are blocked. This commit re-enables a key part of the test which was disabled. closes elastic#107625
1 parent ebec1a2 commit 160faa2

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

modules/kibana/src/internalClusterTest/java/org/elasticsearch/kibana/KibanaThreadPoolIT.java

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
import org.apache.logging.log4j.LogManager;
1313
import org.apache.logging.log4j.Logger;
1414
import org.elasticsearch.action.bulk.BulkResponse;
15+
import org.elasticsearch.action.search.SearchPhaseExecutionException;
16+
import org.elasticsearch.action.search.SearchRequest;
1517
import org.elasticsearch.action.support.WriteRequest;
1618
import org.elasticsearch.client.internal.Client;
1719
import org.elasticsearch.common.settings.Settings;
@@ -37,6 +39,7 @@
3739
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
3840
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
3941
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
42+
import static org.hamcrest.Matchers.containsString;
4043
import static org.hamcrest.Matchers.startsWith;
4144

4245
/**
@@ -150,15 +153,15 @@ private void assertThreadPoolsBlocked() {
150153
new Thread(() -> expectThrows(EsRejectedExecutionException.class, () -> getFuture.actionGet(SAFE_AWAIT_TIMEOUT))).start();
151154

152155
// intentionally commented out this test until https://github.com/elastic/elasticsearch/issues/97916 is fixed
153-
// var e3 = expectThrows(
154-
// SearchPhaseExecutionException.class,
155-
// () -> client().prepareSearch(USER_INDEX)
156-
// .setQuery(QueryBuilders.matchAllQuery())
157-
// // Request times out if max concurrent shard requests is set to 1
158-
// .setMaxConcurrentShardRequests(usually() ? SearchRequest.DEFAULT_MAX_CONCURRENT_SHARD_REQUESTS : randomIntBetween(2, 10))
159-
// .get()
160-
// );
161-
// assertThat(e3.getMessage(), containsString("all shards failed"));
156+
var e3 = expectThrows(
157+
SearchPhaseExecutionException.class,
158+
() -> client().prepareSearch(USER_INDEX)
159+
.setQuery(QueryBuilders.matchAllQuery())
160+
// Request times out if max concurrent shard requests is set to 1
161+
.setMaxConcurrentShardRequests(usually() ? SearchRequest.DEFAULT_MAX_CONCURRENT_SHARD_REQUESTS : randomIntBetween(2, 10))
162+
.get()
163+
);
164+
assertThat(e3.getMessage(), containsString("all shards failed"));
162165
}
163166

164167
protected void runWithBlockedThreadPools(Runnable runnable) throws Exception {

0 commit comments

Comments
 (0)