[Inference API] Fixing flaky test for auth integrationt tests#140321
Merged
jonathan-buttner merged 2 commits intoelastic:mainfrom Jan 7, 2026
Merged
[Inference API] Fixing flaky test for auth integrationt tests#140321jonathan-buttner merged 2 commits intoelastic:mainfrom
jonathan-buttner merged 2 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/search-inference-team (Team:Search - Inference) |
DonalEvans
approved these changes
Jan 7, 2026
Collaborator
💔 Backport failed
You can use sqren/backport to manually backport by running |
Contributor
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
jonathan-buttner
added a commit
to jonathan-buttner/elasticsearch
that referenced
this pull request
Jan 8, 2026
elasticsearchmachine
pushed a commit
that referenced
this pull request
Jan 8, 2026
This was referenced Jan 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow up to: #139978
The tests were muted for a different reason. The issue was that we're adding an empty response before each test is run. The problem with that is the node some times starts (and the authorization task that would call the mock web server and get the empty response) before the
@Beforemethod withinAuthorizationTaskExecutorITis executed. This means we'd enqueue an empty response after the authorization task has attempted to retrieve the empty response, then when the test runs we'd enqueue another response. The test would retrieve the empty response and cause a failure.I tried making the mock webserver a member and have it initialized whenever the node was started but that was resulting in null pointers within some of the tests. I'm opting for enqueuing an empty response right before a node is started and then also clearing the response queue within each test prior to enqueuing the response we expect.