Update the ES creation helper function to teardown it in case of service not available.#18931
Merged
andsel merged 1 commit intoelastic:mainfrom Apr 2, 2026
Conversation
…opagate the error if it doesn't respond to license API call. This could be a sign of RED cluster, but without stopping it the integration tests would create one instance per test, becuase this is generally invoked in test fixture setup and the fixture teardown is not executed if happens in setup.
Contributor
🤖 GitHub commentsJust comment with:
|
Contributor
|
This pull request does not have a backport label. Could you fix it @andsel? 🙏
|
💚 Build Succeeded
cc @andsel |
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.
Release notes
[rn:skip]
What does this PR do?
Update the ES creation helper function to teardown the service and propagate the error if it doesn't respond to license API call. This could be a sign of RED cluster, but without stopping it the integration tests would create one instance per test, becuase this is generally invoked in test fixture setup and the fixture teardown is not executed if happens in setup.
Why is it important/What is the impact to the user?
As a developer I don't want that when ES in integration test has bad times (for example high disk watermark, free < 30%) it doesn't tear down ES instances.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files (and/or docker env variables)[ ] I have added tests that prove my fix is effective or that my feature worksAuthor's Checklist
How to test this PR locally
Consume space on the partition where you run the tests, free space has to go down 30%, so that ES detect a high watermark condition. Run a tests that instantiates ES like:
SPEC_OPTS="-fd -P qa/integration/management/multiple_pipelines_spec.rb" ./gradlew --rerun-tasks :logstash-xpack:rubyIntegrationTestsRelated issues
Use cases
Screenshots
Logs