mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Dedicated executors for plugins and the connection recogniser.
This commit is contained in:
@@ -13,8 +13,6 @@ import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
@@ -56,10 +54,8 @@ import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.google.inject.AbstractModule;
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
import com.google.inject.Module;
|
||||
|
||||
public class H2DatabaseTest extends TestCase {
|
||||
|
||||
@@ -97,14 +93,7 @@ public class H2DatabaseTest extends TestCase {
|
||||
|
||||
public H2DatabaseTest() throws Exception {
|
||||
super();
|
||||
Module testModule = new AbstractModule() {
|
||||
@Override
|
||||
public void configure() {
|
||||
bind(Executor.class).toInstance(
|
||||
new ScheduledThreadPoolExecutor(5));
|
||||
}
|
||||
};
|
||||
Injector i = Guice.createInjector(testModule, new CryptoModule(),
|
||||
Injector i = Guice.createInjector(new CryptoModule(),
|
||||
new DatabaseModule(), new LifecycleModule(),
|
||||
new ProtocolModule(), new SerialModule(),
|
||||
new ProtocolBatchModule(), new TransportModule(),
|
||||
|
||||
Reference in New Issue
Block a user