mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Dedicated executors for plugins and the connection recogniser.
This commit is contained in:
@@ -5,8 +5,6 @@ import static net.sf.briar.api.transport.TransportConstants.MIN_CONNECTION_LENGT
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import net.sf.briar.TestDatabaseModule;
|
||||
@@ -22,10 +20,8 @@ import net.sf.briar.serial.SerialModule;
|
||||
|
||||
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 ConnectionWriterTest extends TestCase {
|
||||
|
||||
@@ -34,14 +30,7 @@ public class ConnectionWriterTest extends TestCase {
|
||||
|
||||
public ConnectionWriterTest() 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 TestDatabaseModule(), new ProtocolBatchModule(),
|
||||
|
||||
Reference in New Issue
Block a user