use of io.github.resilience4j.retry.configure.RetryConfigurationProperties in project resilience4j by resilience4j.
the class SpringBootCommonTest method testRetryCommonConfig.
@Test
public void testRetryCommonConfig() {
RetryConfigurationOnMissingBean retryConfigurationOnMissingBean = new RetryConfigurationOnMissingBean();
assertThat(retryConfigurationOnMissingBean.reactorRetryAspectExt()).isNotNull();
assertThat(retryConfigurationOnMissingBean.rxJava2RetryAspectExt()).isNotNull();
assertThat(retryConfigurationOnMissingBean.retryRegistry(new RetryConfigurationProperties(), new DefaultEventConsumerRegistry<>(), new CompositeRegistryEventConsumer<>(Collections.emptyList()), new CompositeCustomizer<>(Collections.emptyList()))).isNotNull();
final DefaultSpelResolver spelResolver = new DefaultSpelResolver(new SpelExpressionParser(), new StandardReflectionParameterNameDiscoverer(), new GenericApplicationContext());
final FallbackDecorators fallbackDecorators = new FallbackDecorators(Collections.singletonList(new CompletionStageFallbackDecorator()));
assertThat(retryConfigurationOnMissingBean.retryAspect(new RetryConfigurationProperties(), RetryRegistry.ofDefaults(), Collections.emptyList(), new FallbackExecutor(spelResolver, fallbackDecorators), spelResolver, null)).isNotNull();
assertThat(retryConfigurationOnMissingBean.retryRegistryEventConsumer(Optional.empty())).isNotNull();
}
use of io.github.resilience4j.retry.configure.RetryConfigurationProperties in project resilience4j by resilience4j.
the class RefreshScopedRetryConfigurationTest method testRetryCloudCommonConfig.
@Test
public void testRetryCloudCommonConfig() {
RetryConfig retryConfig = new RetryConfig();
assertThat(retryConfig.retryRegistry(new RetryConfigurationProperties(), new DefaultEventConsumerRegistry<>(), new CompositeRegistryEventConsumer<>(emptyList()), new CompositeCustomizer<>(Collections.emptyList()))).isNotNull();
}
Aggregations