File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
qa/os/src/test/java/org/elasticsearch/packaging/test Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,16 @@ public void test50StartAndStop() throws Exception {
137137 // cleanup from previous test
138138 rm (installation .config ("elasticsearch.keystore" ));
139139
140- Archives .runElasticsearch (installation , sh );
140+ try {
141+ Archives .runElasticsearch (installation , sh );
142+ } catch (Exception e ){
143+ if (Files .exists (installation .home .resolve ("elasticsearch.pid" ))) {
144+ String pid = FileUtils .slurp (installation .home .resolve ("elasticsearch.pid" )).trim ();
145+ logger .info ("Dumping jstack of elasticsearch processb ({}) that failed to start" , pid );
146+ sh .runIgnoreExitCode ("jstack " + pid );
147+ }
148+ throw e ;
149+ }
141150
142151 final String gcLogName = Platforms .LINUX && distribution ().hasJdk == false
143152 ? "gc.log.0.current"
You can’t perform that action at this time.
0 commit comments