use of org.komamitsu.fluency.sender.NetworkSender in project fluency by komamitsu.
the class FluencyTest method assertDefaultSender.
private void assertDefaultSender(Sender sender, String expectedHost, int expectedPort, Class<? extends NetworkSender> expectedBaseClass) {
assertThat(sender, instanceOf(RetryableSender.class));
RetryableSender retryableSender = (RetryableSender) sender;
assertDefaultRetryableSender(retryableSender, expectedBaseClass);
NetworkSender networkSender = (NetworkSender) retryableSender.getBaseSender();
assertThat(networkSender.getHost(), is(expectedHost));
assertThat(networkSender.getPort(), is(expectedPort));
assertThat(networkSender.getConnectionTimeoutMilli(), is(5000));
assertThat(networkSender.getReadTimeoutMilli(), is(5000));
FailureDetector failureDetector = networkSender.getFailureDetector();
assertThat(failureDetector, is(nullValue()));
}
Aggregations