mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
19 lines
465 B
Java
19 lines
465 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) {
|
|
fail();
|
|
}
|
|
};
|
|
Thread.setDefaultUncaughtExceptionHandler(fail);
|
|
}
|
|
}
|