use of voldemort.store.socket.SocketDestination in project voldemort by voldemort.
the class ClientRequestExecutorPoolTest method testNonExistentHost.
@Test
public void testNonExistentHost() throws Exception {
SocketDestination nonExistentHost = new SocketDestination("unknown.invalid", port, RequestFormatType.VOLDEMORT_V1);
testConnectionFailure(pool, nonExistentHost, UnresolvedAddressException.class);
}
use of voldemort.store.socket.SocketDestination in project voldemort by voldemort.
the class ClientRequestExecutorPoolTest method setUp.
@Before
public void setUp() throws IOException {
this.port = ServerTestUtils.findFreePort();
this.pool = new ClientRequestExecutorPool(2, maxConnectionsPerNode, CONNECTION_TIMEOUT_MS, SOCKET_TIMEOUT_MS, IDLE_CONNECTION_TIMEOUT_MS, 32 * 1024, false, true, new String());
this.dest1 = new SocketDestination("localhost", port, RequestFormatType.VOLDEMORT_V1);
startServer();
this.nonRespondingPort = ServerTestUtils.findFreePort();
this.nonRespondingDest = new SocketDestination("localhost", nonRespondingPort, RequestFormatType.VOLDEMORT_V1);
this.nonRespondingServer = new NonRespondingSocketService(nonRespondingPort);
this.nonRespondingServer.start();
}
use of voldemort.store.socket.SocketDestination in project voldemort by voldemort.
the class NioSelectorManagerTest method setUp.
@Before
public void setUp() throws IOException {
this.port = ServerTestUtils.findFreePort();
StoreRepository repository = new StoreRepository();
sleepyStore = new SleepyStore<ByteArray, byte[], byte[]>(Long.MAX_VALUE, new InMemoryStorageEngine<ByteArray, byte[], byte[]>(STORE_NAME));
repository.addLocalStore(sleepyStore);
repository.addRoutedStore(sleepyStore);
this.pool = new ClientRequestExecutorPool(50, 300, 250, 32 * 1024);
this.dest1 = new SocketDestination("localhost", port, RequestFormatType.VOLDEMORT_V1);
final Store<ByteArray, byte[], byte[]> socketStore = pool.create(STORE_NAME, "localhost", port, RequestFormatType.VOLDEMORT_V1, RequestRoutingType.NORMAL);
factory = ServerTestUtils.getSocketRequestHandlerFactory(repository);
socketService = ServerTestUtils.getSocketService(true, factory, port, numSelectors, 10, 1000, MAX_HEART_BEAT_MS);
socketService.start();
}
use of voldemort.store.socket.SocketDestination in project voldemort by voldemort.
the class SocketPoolTest method setUp.
@Override
@Before
public void setUp() {
this.port = ServerTestUtils.findFreePort();
this.pool = new SocketPool(maxConnectionsPerNode, 1000, 1000, 32 * 1024);
this.dest1 = new SocketDestination("localhost", port, RequestFormatType.VOLDEMORT_V1);
RequestHandlerFactory handlerFactory = ServerTestUtils.getSocketRequestHandlerFactory(new StoreRepository());
this.server = ServerTestUtils.getSocketService(useNio, handlerFactory, port, 10, 10 + 3, 10000);
this.server.start();
}
Aggregations