Skip to content

Commit 61d03a1

Browse files
authored
ESQL: Fewer serverless docs in tests (elastic#131651)
Drops the number of docs per bulk in test using 5mb text fields for serverless. And raises the number in stateful. Not sure what's up, sending it to the serverless friends to dig more. But this should make it stable in the mean time.
1 parent cc7bbe4 commit 61d03a1

File tree

1 file changed

+14
-2
lines changed
  • test/external-modules/esql-heap-attack/src/javaRestTest/java/org/elasticsearch/xpack/esql/heap_attack

1 file changed

+14
-2
lines changed

test/external-modules/esql-heap-attack/src/javaRestTest/java/org/elasticsearch/xpack/esql/heap_attack/HeapAttackIT.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,8 +884,19 @@ private void initManyBigFieldsIndex(int docs, String type) throws IOException {
884884
}
885885

886886
private void initGiantTextField(int docs) throws IOException {
887-
logger.info("loading many documents with one big text field");
888-
int docsPerBulk = 3;
887+
int docsPerBulk = 10;
888+
for (Map<?, ?> nodeInfo : getNodesInfo(adminClient()).values()) {
889+
for (Object module : (List<?>) nodeInfo.get("modules")) {
890+
Map<?, ?> moduleInfo = (Map<?, ?>) module;
891+
final String moduleName = moduleInfo.get("name").toString();
892+
if (moduleName.startsWith("serverless-")) {
893+
docsPerBulk = 3;
894+
}
895+
}
896+
}
897+
898+
logger.info("loading many documents with one big text field - docs per bulk {}", docsPerBulk);
899+
889900
int fieldSize = Math.toIntExact(ByteSizeValue.ofMb(5).getBytes());
890901

891902
Request request = new Request("PUT", "/bigtext");
@@ -912,6 +923,7 @@ private void initGiantTextField(int docs) throws IOException {
912923
}
913924
}
914925
initIndex("bigtext", bulk.toString());
926+
logger.info("loaded");
915927
}
916928

917929
private void initMvLongsIndex(int docs, int fields, int fieldValues) throws IOException {

0 commit comments

Comments
 (0)