mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
20 lines
498 B
Java
20 lines
498 B
Java
package org.briarproject;
|
|
|
|
import java.lang.Thread.UncaughtExceptionHandler;
|
|
|
|
import static org.junit.Assert.fail;
|
|
|
|
public abstract class BriarTestCase {
|
|
|
|
public 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();
|
|
}
|
|
};
|
|
Thread.setDefaultUncaughtExceptionHandler(fail);
|
|
}
|
|
}
|