Skip to content

Conversation

@jasontedor
Copy link
Member

This test sometimes spuriously fails because we are looking for a specific string in the command line, but jps truncates the output to 1024 characters. Sometimes, the string we are looking for is beyond 1024 characters in the command line. This commit changes the tactic, to instead use jcmd to find the command line of all running JVMs on the machine, and then look for the specific string there. This circumvents the truncation issue.

Closes #77282

This test sometimes spuriously fails because we are looking for a
specific string in the command line, but jps truncates the output to
1024 characters. Sometimes, the string we are looking for is beyond 1024
characters in the command line. This commit changes the tactic, to
instead use jcmd to find the command line of all running JVMs on the
machine, and then look for the specific string there. This circumvents
the truncation issue.
@jasontedor jasontedor added :Core/Infra/Core Core issues without another label >test-failure Triaged test failures from CI v8.0.0 v7.16.0 labels Sep 7, 2021
@jasontedor jasontedor requested a review from gwbrown September 7, 2021 15:40
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Sep 7, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

Copy link
Contributor

@gwbrown gwbrown left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for digging in and fixing!

@gwbrown
Copy link
Contributor

gwbrown commented Sep 7, 2021

Just saw #77385, that'll teach me to refresh the page for comments before reviewing. I don't have strong opinions about which approach we should take.

@jasontedor jasontedor merged commit d5ccfea into elastic:master Sep 8, 2021
jasontedor added a commit that referenced this pull request Sep 8, 2021
This test sometimes spuriously fails because we are looking for a
specific string in the command line, but jps truncates the output to
1024 characters. Sometimes, the string we are looking for is beyond 1024
characters in the command line. This commit changes the tactic, to
instead use jcmd to find the command line of all running JVMs on the
machine, and then look for the specific string there. This circumvents
the truncation issue.
@jasontedor jasontedor deleted the fix-test-die-with-dignity-test branch September 8, 2021 14:42
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 Team:Core/Infra Meta label for core/infra team >test-failure Triaged test failures from CI v7.16.0 v8.0.0-alpha2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DieWithDignityIT.testDieWithDignity failures on CI

5 participants