Search in sources :

Example 1 with NetworkSender

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()));
}
Also used : FailureDetector(org.komamitsu.fluency.fluentd.ingester.sender.failuredetect.FailureDetector) NetworkSender(org.komamitsu.fluency.fluentd.ingester.sender.NetworkSender) RetryableSender(org.komamitsu.fluency.fluentd.ingester.sender.RetryableSender)

Aggregations

NetworkSender (org.komamitsu.fluency.fluentd.ingester.sender.NetworkSender)1 RetryableSender (org.komamitsu.fluency.fluentd.ingester.sender.RetryableSender)1 FailureDetector (org.komamitsu.fluency.fluentd.ingester.sender.failuredetect.FailureDetector)1