Test: dump all threads when delete index fails during test cleanup

This commit is contained in:
Michael McCandless 2014-11-11 10:49:26 -05:00 committed by mikemccand
parent 94c1a7dabe
commit a783d342d2

View File

@ -151,6 +151,12 @@ public abstract class TestCluster implements Iterable<Client>, Closeable {
assertAcked(client().admin().indices().prepareDelete(concreteIndices.toArray(String.class)));
}
}
} catch (AssertionError ae) {
// Try to see what threads are doing when we hit the "Delete index failed - not acked":
logger.info("dump all threads on AssertionError");
ElasticsearchTestCase.printStackDump(logger);
logger.info("done dump all threads on AssertionError");
throw ae;
}
}
}