Skip to content

Conversation

@jasontedor
Copy link
Member

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.

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.
@jasontedor jasontedor added :Core/Infra/Core Core issues without another label v8.0.0 v7.16.0 labels Sep 1, 2021
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Sep 1, 2021
@elasticmachine
Copy link
Collaborator

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";
Copy link
Member Author

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.

Copy link
Member

@rjernst rjernst left a 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(() -> {
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Contributor

@henningandersen henningandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM2

@jasontedor jasontedor merged commit c7130eb into elastic:master Sep 3, 2021
jasontedor added a commit that referenced this pull request Sep 3, 2021
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.
@jasontedor jasontedor deleted the die-with-dignity-test-module branch September 3, 2021 17:09
wjp719 added a commit to wjp719/elasticsearch that referenced this pull request Sep 4, 2021
* 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
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Sep 7, 2021
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
elasticsearchmachine pushed a commit that referenced this pull request Sep 7, 2021
After moving test-die-with-dignity to an external test module (see #77136) we need
to ensure the javaRestTests are only triggered in snapshot builds as they fail
on non snapshot builds.

Fixes #77326
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Sep 7, 2021
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
elasticsearchmachine pushed a commit that referenced this pull request Sep 7, 2021
After moving test-die-with-dignity to an external test module (see #77136) we need
to ensure the javaRestTests are only triggered in snapshot builds as they fail
on non snapshot builds.

Fixes #77326
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Core Core issues without another label >non-issue Team:Core/Infra Meta label for core/infra team v7.16.0 v8.0.0-alpha2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants