.maxRedirects(2) .serverSets(local, remotes) .streamNameRegex(streamRegex) .handshakeWithClientInfo(handshakeWithClientInfo) .clientBuilder(ClientBuilder.get()
.requestTimeoutMs(10000) .statsReceiver(statsReceiver) .streamNameRegex("^" + streamPrefix + "_[0-9]+$") .handshakeWithClientInfo(handshakeWithClientInfo) .periodicHandshakeIntervalMs(TimeUnit.SECONDS.toMillis(30))
@Test(timeout = 60000) public void testBuildClientsFromSameBuilder() throws Exception { DistributedLogClientBuilder builder = DistributedLogClientBuilder.newBuilder() .name("build-clients-from-same-builder") .clientId(ClientId$.MODULE$.apply("test-builder")) .finagleNameStr("inet!127.0.0.1:7001") .streamNameRegex(".*") .handshakeWithClientInfo(true) .clientBuilder(ClientBuilder.get() .hostConnectionLimit(1) .connectTimeout(Duration.fromSeconds(1)) .tcpConnectTimeout(Duration.fromSeconds(1)) .requestTimeout(Duration.fromSeconds(10))); DistributedLogClient client1 = builder.build(); DistributedLogClient client2 = builder.build(); assertFalse(client1 == client2); } }