Skip to content

Commit c1ad102

Browse files
authored
Avoid HandleLimitFS in LookupJoinTypesIT (#129437) (#129494)
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
1 parent a68caad commit c1ad102

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/LookupJoinTypesIT.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@
77

88
package org.elasticsearch.xpack.esql.action;
99

10+
import org.apache.lucene.tests.util.LuceneTestCase;
11+
import org.elasticsearch.action.index.IndexRequestBuilder;
1012
import org.elasticsearch.common.settings.Settings;
1113
import org.elasticsearch.index.mapper.extras.MapperExtrasPlugin;
1214
import org.elasticsearch.plugins.Plugin;
1315
import org.elasticsearch.test.ESIntegTestCase;
1416
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
17+
import org.elasticsearch.xcontent.XContentType;
1518
import org.elasticsearch.xpack.core.esql.action.ColumnInfo;
1619
import org.elasticsearch.xpack.esql.VerificationException;
1720
import org.elasticsearch.xpack.esql.core.type.DataType;
@@ -118,6 +121,7 @@
118121
* And assert that the result exists and is equal to "value".
119122
*/
120123
@ClusterScope(scope = SUITE, numClientNodes = 1, numDataNodes = 1)
124+
@LuceneTestCase.SuppressFileSystems(value = "HandleLimitFS")
121125
public class LookupJoinTypesIT extends ESIntegTestCase {
122126
protected Collection<Class<? extends Plugin>> nodePlugins() {
123127
return List.of(
@@ -363,16 +367,18 @@ private void initIndexes(String group) {
363367
private void initData(String group) {
364368
Collection<TestConfig> configs = testConfigurations.get(group).configs.values();
365369
int docId = 0;
370+
List<IndexRequestBuilder> indexRequests = new ArrayList<>(configs.size());
366371
for (TestConfig config : configs) {
367372
String doc = String.format(Locale.ROOT, """
368373
{
369374
%s,
370375
"other": "value"
371376
}
372377
""", lookupPropertyFor(config));
373-
index(config.indexName(), "" + (++docId), doc);
374-
refresh(config.indexName());
378+
var indexRequest = client().prepareIndex().setIndex(config.indexName()).setId("" + (++docId)).setSource(doc, XContentType.JSON);
379+
indexRequests.add(indexRequest);
375380
}
381+
indexRandom(true, indexRequests);
376382
List<String> mainProperties = configs.stream().map(this::mainPropertyFor).distinct().collect(Collectors.toList());
377383
index("index", "1", String.format(Locale.ROOT, """
378384
{

0 commit comments

Comments
 (0)