Skip to content

Commit 1530802

Browse files
authored
ESQL: Retry test on 403 (#114450) (#114650)
Retry the async test when you get a 403 - that could be because security has not yet booted. We should have permission to fetch everything.
1 parent 5def107 commit 1530802

File tree

1 file changed

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

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,15 @@ public void testSortByManyLongsTooMuchMemoryAsync() throws IOException {
129129
try {
130130
resp = client().performRequest(fetch);
131131
} catch (ResponseException e) {
132+
if (e.getResponse().getStatusLine().getStatusCode() == 403) {
133+
/*
134+
* There's a bug when loading from the translog with security
135+
* enabled. If we retry a few times we'll load from the index
136+
* itself and should succeed.
137+
*/
138+
logger.error("polled for results got 403");
139+
continue;
140+
}
132141
if (e.getResponse().getStatusLine().getStatusCode() == 404) {
133142
logger.error("polled for results got 404");
134143
continue;

0 commit comments

Comments
 (0)