Skip to content

Commit

Permalink
ESQL: Retry test on 403 (elastic#114450)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nik9000 authored Oct 11, 2024
1 parent a62228a commit 4c48aa3
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ public void testSortByManyLongsTooMuchMemoryAsync() throws IOException {
try {
resp = client().performRequest(fetch);
} catch (ResponseException e) {
if (e.getResponse().getStatusLine().getStatusCode() == 403) {
/*
* There's a bug when loading from the translog with security
* enabled. If we retry a few times we'll load from the index
* itself and should succeed.
*/
logger.error("polled for results got 403");
continue;
}
if (e.getResponse().getStatusLine().getStatusCode() == 404) {
logger.error("polled for results got 404");
continue;
Expand Down

0 comments on commit 4c48aa3

Please sign in to comment.