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 bc5b15a4eba52..2a017bf9d39d4 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 @@ -310,7 +310,7 @@ private Response query(String query, String filterPath) throws IOException { request.setJsonEntity(query.toString().replace("\n", "\\n")); request.setOptions( RequestOptions.DEFAULT.toBuilder() - .setRequestConfig(RequestConfig.custom().setSocketTimeout(Math.toIntExact(TimeValue.timeValueMinutes(5).millis())).build()) + .setRequestConfig(RequestConfig.custom().setSocketTimeout(Math.toIntExact(TimeValue.timeValueMinutes(6).millis())).build()) .setWarningsHandler(WarningsHandler.PERMISSIVE) ); logger.info("--> test {} started querying", getTestName()); @@ -330,6 +330,10 @@ protected void doRun() throws Exception { TimeValue elapsed = TimeValue.timeValueNanos(System.nanoTime() - startedTimeInNanos); logger.info("--> test {} triggering OOM after {}", getTestName(), elapsed); Request triggerOOM = new Request("POST", "/_trigger_out_of_memory"); + RequestConfig requestConfig = RequestConfig.custom() + .setSocketTimeout(Math.toIntExact(TimeValue.timeValueMinutes(2).millis())) + .build(); + request.setOptions(RequestOptions.DEFAULT.toBuilder().setRequestConfig(requestConfig)); client().performRequest(triggerOOM); } }, TimeValue.timeValueMinutes(5), testThreadPool.executor(ThreadPool.Names.GENERIC));