use of org.komamitsu.fluency.fluentd.ingester.sender.NetworkSender in project fluency by komamitsu.
the class FluencyBuilderForFluentdTest method assertDefaultFluentdSender.
private void assertDefaultFluentdSender(FluentdSender 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