sinttest: log unexpected Throwables thrown by runTests()

Because we would not see those if the finally block also threw.
This commit is contained in:
Florian Schmaus 2020-04-15 19:44:16 +02:00
parent da5f59a996
commit 162651821e
1 changed files with 5 additions and 0 deletions

View File

@ -227,6 +227,11 @@ public class SmackIntegrationTestFramework {
try {
runTests(classes);
}
catch (Throwable t) {
// Log the thrown Throwable to prevent it being shadowed in case the finally block below also throws.
LOGGER.log(Level.SEVERE, "Unexpected abort because runTests() threw throwable", t);
throw t;
}
finally {
// Ensure that the accounts are deleted and disconnected before we continue
connectionManager.disconnectAndCleanup();