Print stack trace for uncaught exceptions during tests for easier debugging

This commit is contained in:
Torsten Grote
2016-10-14 08:44:47 -03:00
parent 5674ee2d88
commit 6e04664915
2 changed files with 1 additions and 2 deletions

View File

@@ -9,8 +9,6 @@ import static org.junit.Assert.assertEquals;
public abstract class BriarIntegrationTest extends BriarTestCase {
// TODO maybe we could add uncaught exception handlers for other threads here (#670)
protected void assertGroupCount(MessageTracker tracker, GroupId g,
long msgCount, long unreadCount, long latestMsg)
throws DbException {

View File

@@ -10,6 +10,7 @@ public abstract class BriarTestCase {
// Ensure exceptions thrown on worker threads cause tests to fail
UncaughtExceptionHandler fail = new UncaughtExceptionHandler() {
public void uncaughtException(Thread thread, Throwable throwable) {
throwable.printStackTrace();
fail();
}
};