Skip to content

Commit 0113aef

Browse files
authored
Avoid HandleLimitFS in LookupJoinTypesIT (#129437) (#129493)
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 bdd93c9 commit 0113aef

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;
@@ -117,6 +120,7 @@
117120
* And assert that the result exists and is equal to "value".
118121
*/
119122
@ClusterScope(scope = SUITE, numClientNodes = 1, numDataNodes = 1)
123+
@LuceneTestCase.SuppressFileSystems(value = "HandleLimitFS")
120124
public class LookupJoinTypesIT extends ESIntegTestCase {
121125
protected Collection<Class<? extends Plugin>> nodePlugins() {
122126
return List.of(
@@ -357,16 +361,18 @@ private void initIndexes(String group) {
357361
private void initData(String group) {
358362
Collection<TestConfig> configs = testConfigurations.get(group).configs.values();
359363
int docId = 0;
364+
List<IndexRequestBuilder> indexRequests = new ArrayList<>(configs.size());
360365
for (TestConfig config : configs) {
361366
String doc = String.format(Locale.ROOT, """
362367
{
363368
%s,
364369
"other": "value"
365370
}
366371
""", lookupPropertyFor(config));
367-
index(config.indexName(), "" + (++docId), doc);
368-
refresh(config.indexName());
372+
var indexRequest = client().prepareIndex().setIndex(config.indexName()).setId("" + (++docId)).setSource(doc, XContentType.JSON);
373+
indexRequests.add(indexRequest);
369374
}
375+
indexRandom(true, indexRequests);
370376
List<String> mainProperties = configs.stream().map(this::mainPropertyFor).distinct().collect(Collectors.toList());
371377
index("index", "1", String.format(Locale.ROOT, """
372378
{

0 commit comments

Comments
 (0)