org.springframework.cloud.client.ReactiveCommonsClientAutoConfiguration Java Examples
The following examples show how to use
org.springframework.cloud.client.ReactiveCommonsClientAutoConfiguration.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CloudFoundryReactiveDiscoveryClientConfigurationTests.java From spring-cloud-cloudfoundry with Apache License 2.0 | 6 votes |
@Test public void shouldUseDnsDiscovery() { contextRunner .withConfiguration(AutoConfigurations .of(ReactiveCommonsClientAutoConfiguration.class)) .withPropertyValues("spring.cloud.cloudfoundry.discovery.use-dns=true", "spring.cloud.cloudfoundry.discovery.use-container-ip=true") .run(context -> { assertThat(context) .hasSingleBean(CloudFoundryReactiveHeartbeatSender.class); assertThat(context).hasSingleBean(ReactiveDiscoveryClient.class); assertThat(context).hasBean("dnsBasedReactiveDiscoveryClient"); assertThat(context) .hasSingleBean(ReactiveDiscoveryClientHealthIndicator.class); }); }
Example #2
Source File: CloudFoundryReactiveDiscoveryClientConfigurationTests.java From spring-cloud-cloudfoundry with Apache License 2.0 | 6 votes |
@Test public void shouldUseAppServiceDiscovery() { contextRunner .withConfiguration(AutoConfigurations .of(ReactiveCommonsClientAutoConfiguration.class)) .withPropertyValues("spring.cloud.cloudfoundry.discovery.use-dns=true", "spring.cloud.cloudfoundry.discovery.use-container-ip=false") .run(context -> { assertThat(context) .hasSingleBean(CloudFoundryReactiveHeartbeatSender.class); assertThat(context).hasSingleBean(ReactiveDiscoveryClient.class); assertThat(context).hasBean("appServiceReactiveDiscoveryClient"); assertThat(context) .hasSingleBean(ReactiveDiscoveryClientHealthIndicator.class); }); }
Example #3
Source File: CloudFoundryReactiveDiscoveryClientConfigurationTests.java From spring-cloud-cloudfoundry with Apache License 2.0 | 6 votes |
@Test public void shouldUseCustomServiceDiscovery() { contextRunner .withConfiguration(AutoConfigurations .of(ReactiveCommonsClientAutoConfiguration.class)) .withUserConfiguration( CustomCloudFoundryReactiveDiscoveryClientConfiguration.class) .run(context -> { assertThat(context) .hasSingleBean(CloudFoundryReactiveHeartbeatSender.class); assertThat(context).getBeans(ReactiveDiscoveryClient.class) .hasSize(2); assertThat(context).hasBean("nativeCloudFoundryDiscoveryClient"); assertThat(context) .hasSingleBean(ReactiveDiscoveryClientHealthIndicator.class); }); }
Example #4
Source File: CloudFoundryReactiveDiscoveryClientConfigurationTests.java From spring-cloud-cloudfoundry with Apache License 2.0 | 5 votes |
@Test public void shouldUseNativeDiscovery() { contextRunner .withConfiguration(AutoConfigurations .of(ReactiveCommonsClientAutoConfiguration.class)) .run(context -> { assertThat(context) .hasSingleBean(CloudFoundryReactiveHeartbeatSender.class); assertThat(context).hasSingleBean(ReactiveDiscoveryClient.class); assertThat(context).hasBean("nativeCloudFoundryDiscoveryClient"); assertThat(context) .hasSingleBean(ReactiveDiscoveryClientHealthIndicator.class); }); }