Added a connection registry to avoid creating redundant connections.

This commit is contained in:
akwizgran
2011-12-09 17:34:58 +00:00
parent 9abe920edb
commit f9f41acde9
69 changed files with 435 additions and 182 deletions

View File

@@ -0,0 +1,19 @@
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);
}
}