-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Convert die with dignity test to new rest test infra #97734
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
Conversation
This commit rewrites the DieWithDignity test to use the new test infra. A side effect of this change is that it no longer relies on jps, which appears to have issues on Windows. closes elastic#77282
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
mark-vieira
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.
Couple minor comments, otherwise LGTM. Have we done any testing on Windows here? This seems like the kind of thing that would be sensitive to platform differences and I don't see anything expressly forbidding Windows execution.
| GradleUtils.extendSourceSet(project, "main", "javaRestTest", tasks.named("javaRestTest")) | ||
|
|
||
| tasks.named("javaRestTest").configure { | ||
| it.onlyIf("snapshot build") { BuildParams.isSnapshotBuild() } |
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 can't these tests run against release builds?
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 test uses a test external-module, which are only bundled with snapshots. This is also why we must use the default distribution. We could probably rework this, but I'd like to not change that here.
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.
Nevermind, figured it out.
| // disable exit on out of memory error to let DieWithDignityIT verify that OOM handling without that works (including OOMs that are not caused by | ||
| // memory like native threads. We leave it to the JVM to test that exit on OOM works via the flag. | ||
| jvmArgs '-XX:-ExitOnOutOfMemoryError' | ||
| usesDefaultDistribution() |
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.
Is it strictly necessary for these tests to use the default distribution? Could they not use the integ-test distro?
|
|
||
| @ClassRule | ||
| public static ElasticsearchCluster cluster = ElasticsearchCluster.local() | ||
| .nodes(1) |
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.
FYI, this is superfluous since by default, unless explicitly specified, it'll create a single-node cluster.
|
@rjernst - any hints to what why this test fails when run with fips |
|
The exit code is not what I would expect: But our uncaught exception handler (which handles termination from Errors) halts with code 127 on OOM. The test fails because it does not see the log messages the uncaught exception handler emits. Is FIPS replacing our uncaught exception handler somehow? Or using some other trickiness to intercept the OOM and not allow our uncaught exception handler to proceed? @tvernum @ChrisHegarty any ideas on what FIPS might be doing or ways our uncaught exception handler might be overhsadowed? |
|
Well, that was fun to debug... It turns out that it has nothing to do with the uncaught exception handler. It was entirely because (on FIPS) this line was ineffective: Line 40 in 1d995eb
And the reason is due to a minor bug in the way the test cluster framework puts together the environment properties. I opened #97776 |
This commit rewrites the DieWithDignity test to use the new test infra. A side effect of this change is that it no longer relies on jps, which appears to have issues on Windows.
closes #77282