Skip to content
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

Tests: dump all thread stacks on failure #8033

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -605,13 +605,13 @@ protected final void afterInternal() throws IOException {
}
logger.info("[{}#{}]: cleaned up after test", getTestClass().getSimpleName(), getTestName());
success = true;
} catch (OutOfMemoryError e) {
if (e.getMessage().contains("unable to create new native thread")) {
ElasticsearchTestCase.printStackDump(logger);
}
throw e;
} finally {
if (!success || CurrentTestFailedMarker.testFailed()) {

logger.info("[{}#{}]: now dump all thread stacks on failure", getTestClass().getSimpleName(), getTestName());
ElasticsearchTestCase.printStackDump(logger);
logger.info("[{}#{}]: done dump all thread stacks on failure", getTestClass().getSimpleName(), getTestName());

// if we failed that means that something broke horribly so we should
// clear all clusters and if the current cluster is the global we shut that one
// down as well to prevent subsequent tests from failing due to the same problem.
Expand Down