-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Move die with dignity to be a test module #77136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move die with dignity to be a test module #77136
Conversation
This commit moves the die with dignity tests to be a test module. The purpose of this is so the _die_with_dignity endpoint is available in snapshot builds, for the purpose of enabling testing orchestration logic that manages what happens to a node after it dies with an OutOfMemoryError.
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
| @@ -25,10 +25,6 @@ | |||
|
|
|||
| public class DieWithDignityPlugin extends Plugin implements ActionPlugin { | |||
|
|
|||
| public DieWithDignityPlugin() { | |||
| assert System.getProperty("die.with.dignity.test") != null : "test should pass the `die.with.dignity.test` property"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this module is now installed in all snapshot builds, this plugin is loaded in all other test suites where this system property would not be configured. This is why this assertion has to be dropped.
rjernst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
|
||
| public void testDieWithDignity() throws Exception { | ||
| // there should be an Elasticsearch process running with the die.with.dignity.test system property | ||
| assertBusy(() -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this stall necessary? Doesn't the rest test infrastructure not run the tests until ES is up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The simple explanation is that I copy/pasted the code below that checks that the die-with-dignity instance has been killed, with the intention of modifying it to remove the busy assert, and change it to a check that the die-with-dignity instance is up. Except, I forgot to remove the busy assert. 🤦♀️
I've removed this now in 3dd8db6.
henningandersen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM2
This commit moves the die with dignity tests to be a test module. The purpose of this is so the _die_with_dignity endpoint is available in snapshot builds, for the purpose of enabling testing orchestration logic that manages what happens to a node after it dies with an OutOfMemoryError.
* master: (128 commits) Mute DieWithDignityIT (elastic#77283) Fix randomization in MlNodeShutdownIT (elastic#77281) Add target_node_name for REPLACE shutdown type (elastic#77151) [DOCS] Adds information about version compatibility headers (elastic#77096) Fix template equals when mappings are wrapped (elastic#77008) Fix TextFieldMapper Retaining a Reference to its Builder (elastic#77251) Move die with dignity to be a test module (elastic#77136) Update task names for rest compatiblity (elastic#75267) [ML] adjusting bwc serialization for elastic#77256 (elastic#77257) Move `index.hidden` from Static to Dynamic settings (elastic#77218) Handle cgroups v2 in `OsProbe` (elastic#77128) Choose postings format from FieldMapper instead of MappedFieldType (elastic#77234) Add segment sorter for data streams (elastic#75195) Update skip after backport (elastic#77212) [ML] adding new defer_definition_decompression parameter to put trained model API (elastic#77189) [ML] Fix bug in inference stats persister for when feature reset is called Only check replicas in cancelling existing recoveries. (elastic#60564) Format `AbstractFilteringTestCase` (elastic#77217) [DOCS] Fixes line breaks. (elastic#77248) Convert 'routing' values in REST API tests to strings ... # Conflicts: # server/src/main/java/org/elasticsearch/cluster/metadata/DataStream.java
After moving test-die-with-dignity to an external test module (see elastic#77136) we need to ensure the javaRestTests are only triggered in snapshot builds as they fail on non snapshot builds. Fixes elastic#77326
After moving test-die-with-dignity to an external test module (see elastic#77136) we need to ensure the javaRestTests are only triggered in snapshot builds as they fail on non snapshot builds. Fixes elastic#77326
This commit moves the die with dignity tests to be a test module. The purpose of this is so the
_die_with_dignityendpoint is available in snapshot builds, for the purpose of enabling testing orchestration logic that manages what happens to a node after it dies with anOutOfMemoryError.