From 9a2a91e3ae2ed5f0594b9c2ee91299ce6c2d826f Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Mon, 16 Jun 2025 08:18:33 -0700 Subject: [PATCH] Avoid HandleLimitFS in LookupJoinTypesIT (#129437) In this test, we create a hundred indices for different combinations of data types. The number of file descriptors used exceeds the limit of HandleLimitFS; therefore, we avoid using it in this test. Relates #126150 Closes #129344 --- .../xpack/esql/action/LookupJoinTypesIT.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/LookupJoinTypesIT.java b/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/LookupJoinTypesIT.java index 978069469c427..b3b0f74cc8884 100644 --- a/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/LookupJoinTypesIT.java +++ b/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/LookupJoinTypesIT.java @@ -7,11 +7,14 @@ package org.elasticsearch.xpack.esql.action; +import org.apache.lucene.tests.util.LuceneTestCase; +import org.elasticsearch.action.index.IndexRequestBuilder; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.mapper.extras.MapperExtrasPlugin; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; +import org.elasticsearch.xcontent.XContentType; import org.elasticsearch.xpack.core.esql.action.ColumnInfo; import org.elasticsearch.xpack.esql.VerificationException; import org.elasticsearch.xpack.esql.core.type.DataType; @@ -118,6 +121,7 @@ * And assert that the result exists and is equal to "value". */ @ClusterScope(scope = SUITE, numClientNodes = 1, numDataNodes = 1) +@LuceneTestCase.SuppressFileSystems(value = "HandleLimitFS") public class LookupJoinTypesIT extends ESIntegTestCase { protected Collection> nodePlugins() { return List.of( @@ -363,6 +367,7 @@ private void initIndexes(String group) { private void initData(String group) { Collection configs = testConfigurations.get(group).configs.values(); int docId = 0; + List indexRequests = new ArrayList<>(configs.size()); for (TestConfig config : configs) { String doc = String.format(Locale.ROOT, """ { @@ -370,9 +375,10 @@ private void initData(String group) { "other": "value" } """, lookupPropertyFor(config)); - index(config.indexName(), "" + (++docId), doc); - refresh(config.indexName()); + var indexRequest = client().prepareIndex().setIndex(config.indexName()).setId("" + (++docId)).setSource(doc, XContentType.JSON); + indexRequests.add(indexRequest); } + indexRandom(true, indexRequests); List mainProperties = configs.stream().map(this::mainPropertyFor).distinct().collect(Collectors.toList()); index("index", "1", String.format(Locale.ROOT, """ {