Search in sources :

Example 6 with ExponentialBackOffRetryStrategy

use of org.komamitsu.fluency.fluentd.ingester.sender.retry.ExponentialBackOffRetryStrategy in project fluency by komamitsu.

the class FluencyBuilderForFluentdTest method assertDefaultRetryableSender.

private void assertDefaultRetryableSender(RetryableSender sender, Class<? extends NetworkSender> expectedBaseClass) {
    assertThat(sender.getRetryStrategy(), instanceOf(ExponentialBackOffRetryStrategy.class));
    ExponentialBackOffRetryStrategy retryStrategy = (ExponentialBackOffRetryStrategy) sender.getRetryStrategy();
    assertThat(retryStrategy.getMaxRetryCount(), is(7));
    assertThat(retryStrategy.getBaseIntervalMillis(), is(400));
    assertThat(sender.getBaseSender(), instanceOf(expectedBaseClass));
}
Also used : ExponentialBackOffRetryStrategy(org.komamitsu.fluency.fluentd.ingester.sender.retry.ExponentialBackOffRetryStrategy)

Aggregations

ExponentialBackOffRetryStrategy (org.komamitsu.fluency.fluentd.ingester.sender.retry.ExponentialBackOffRetryStrategy)6 Test (org.junit.jupiter.api.Test)4 RetryableSender (org.komamitsu.fluency.fluentd.ingester.sender.RetryableSender)3 InetSocketAddress (java.net.InetSocketAddress)2 Fluency (org.komamitsu.fluency.Fluency)2 MultiSender (org.komamitsu.fluency.fluentd.ingester.sender.MultiSender)2 FailureDetector (org.komamitsu.fluency.fluentd.ingester.sender.failuredetect.FailureDetector)2 Buffer (org.komamitsu.fluency.buffer.Buffer)1 FluentdIngester (org.komamitsu.fluency.fluentd.ingester.FluentdIngester)1 SSLSender (org.komamitsu.fluency.fluentd.ingester.sender.SSLSender)1 TCPSender (org.komamitsu.fluency.fluentd.ingester.sender.TCPSender)1 Flusher (org.komamitsu.fluency.flusher.Flusher)1