diff --git a/test/external-modules/esql-heap-attack/src/javaRestTest/java/org/elasticsearch/xpack/esql/heap_attack/HeapAttackIT.java b/test/external-modules/esql-heap-attack/src/javaRestTest/java/org/elasticsearch/xpack/esql/heap_attack/HeapAttackIT.java index 893acbd22cc23..4ed79024a19f9 100644 --- a/test/external-modules/esql-heap-attack/src/javaRestTest/java/org/elasticsearch/xpack/esql/heap_attack/HeapAttackIT.java +++ b/test/external-modules/esql-heap-attack/src/javaRestTest/java/org/elasticsearch/xpack/esql/heap_attack/HeapAttackIT.java @@ -884,8 +884,19 @@ private void initManyBigFieldsIndex(int docs, String type) throws IOException { } private void initGiantTextField(int docs) throws IOException { - logger.info("loading many documents with one big text field"); - int docsPerBulk = 3; + int docsPerBulk = 10; + for (Map nodeInfo : getNodesInfo(adminClient()).values()) { + for (Object module : (List) nodeInfo.get("modules")) { + Map moduleInfo = (Map) module; + final String moduleName = moduleInfo.get("name").toString(); + if (moduleName.startsWith("serverless-")) { + docsPerBulk = 3; + } + } + } + + logger.info("loading many documents with one big text field - docs per bulk {}", docsPerBulk); + int fieldSize = Math.toIntExact(ByteSizeValue.ofMb(5).getBytes()); Request request = new Request("PUT", "/bigtext"); @@ -912,6 +923,7 @@ private void initGiantTextField(int docs) throws IOException { } } initIndex("bigtext", bulk.toString()); + logger.info("loaded"); } private void initMvLongsIndex(int docs, int fields, int fieldValues) throws IOException {