mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
20 lines
485 B
Java
20 lines
485 B
Java
package net.sf.briar;
|
|
|
|
import java.lang.Thread.UncaughtExceptionHandler;
|
|
|
|
import junit.framework.TestCase;
|
|
|
|
public abstract class BriarTestCase extends TestCase {
|
|
|
|
public BriarTestCase() {
|
|
super();
|
|
// Ensure exceptions thrown on worker threads cause tests to fail
|
|
UncaughtExceptionHandler fail = new UncaughtExceptionHandler() {
|
|
public void uncaughtException(Thread thread, Throwable throwable) {
|
|
fail();
|
|
}
|
|
};
|
|
Thread.setDefaultUncaughtExceptionHandler(fail);
|
|
}
|
|
}
|