1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-24 03:27:59 +01:00

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

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();