Create a thread dump if ES fails to start in packaging tests (#48932)
Relates to #15385. Hoping to get some insight on CI failures.
This commit is contained in:
parent
ea9f094e75
commit
5c6f8bab8d
|
@ -137,7 +137,16 @@ public class ArchiveTests extends PackagingTestCase {
|
|||
// cleanup from previous test
|
||||
rm(installation.config("elasticsearch.keystore"));
|
||||
|
||||
Archives.runElasticsearch(installation, sh);
|
||||
try {
|
||||
Archives.runElasticsearch(installation, sh);
|
||||
} catch (Exception e ){
|
||||
if (Files.exists(installation.home.resolve("elasticsearch.pid"))) {
|
||||
String pid = FileUtils.slurp(installation.home.resolve("elasticsearch.pid")).trim();
|
||||
logger.info("Dumping jstack of elasticsearch processb ({}) that failed to start", pid);
|
||||
sh.runIgnoreExitCode("jstack " + pid);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
final String gcLogName = Platforms.LINUX && distribution().hasJdk == false
|
||||
? "gc.log.0.current"
|
||||
|
|
Loading…
Reference in New Issue