From 5cf5d12cf682df225c1d0366f89b1a6e29928967 Mon Sep 17 00:00:00 2001 From: Kris Iyer Date: Wed, 25 Nov 2020 14:35:20 -0500 Subject: [PATCH] fix conflicts upon merge (#676) * fix conflicts upon merge * Bump kind test await timeout from 15 to 60 seconds for spring-cloud-kubernetes-client-config-it. This should make tests a bit more reliable. --- .../ConfigurationWatcherAutoConfiguration.java | 16 ++++++++-------- .../client/config/it/ConfigMapAndSecretIT.java | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/spring-cloud-kubernetes-controllers/spring-cloud-kubernetes-configuration-watcher/src/main/java/org/springframework/cloud/kubernetes/configuration/watcher/ConfigurationWatcherAutoConfiguration.java b/spring-cloud-kubernetes-controllers/spring-cloud-kubernetes-configuration-watcher/src/main/java/org/springframework/cloud/kubernetes/configuration/watcher/ConfigurationWatcherAutoConfiguration.java index f06642f8..f4afd684 100644 --- a/spring-cloud-kubernetes-controllers/spring-cloud-kubernetes-configuration-watcher/src/main/java/org/springframework/cloud/kubernetes/configuration/watcher/ConfigurationWatcherAutoConfiguration.java +++ b/spring-cloud-kubernetes-controllers/spring-cloud-kubernetes-configuration-watcher/src/main/java/org/springframework/cloud/kubernetes/configuration/watcher/ConfigurationWatcherAutoConfiguration.java @@ -53,7 +53,7 @@ public class ConfigurationWatcherAutoConfiguration { @Bean @ConditionalOnMissingBean(ConfigMapWatcherChangeDetector.class) - @ConditionalOnBean(ConfigMapPropertySourceLocator.class) + @ConditionalOnBean(Fabric8ConfigMapPropertySourceLocator.class) public ConfigMapWatcherChangeDetector httpBasedConfigMapWatchChangeDetector(AbstractEnvironment environment, KubernetesClient kubernetesClient, Fabric8ConfigMapPropertySourceLocator fabric8ConfigMapPropertySourceLocator, @@ -69,7 +69,7 @@ public class ConfigurationWatcherAutoConfiguration { @Bean @ConditionalOnMissingBean(SecretsWatcherChangeDetector.class) - @ConditionalOnBean(SecretsPropertySourceLocator.class) + @ConditionalOnBean(Fabric8SecretsPropertySourceLocator.class) public SecretsWatcherChangeDetector httpBasedSecretsWatchChangeDetector(AbstractEnvironment environment, KubernetesClient kubernetesClient, Fabric8SecretsPropertySourceLocator fabric8SecretsPropertySourceLocator, ConfigReloadProperties properties, ConfigurationUpdateStrategy strategy, @@ -88,7 +88,7 @@ public class ConfigurationWatcherAutoConfiguration { @Bean @ConditionalOnMissingBean(ConfigMapWatcherChangeDetector.class) - @ConditionalOnBean(ConfigMapPropertySourceLocator.class) + @ConditionalOnBean(Fabric8ConfigMapPropertySourceLocator.class) public ConfigMapWatcherChangeDetector busConfigMapChangeWatcher(BusProperties busProperties, AbstractEnvironment environment, KubernetesClient kubernetesClient, Fabric8ConfigMapPropertySourceLocator fabric8ConfigMapPropertySourceLocator, @@ -101,10 +101,10 @@ public class ConfigurationWatcherAutoConfiguration { @Bean @ConditionalOnMissingBean(SecretsWatcherChangeDetector.class) - @ConditionalOnBean(SecretsPropertySourceLocator.class) + @ConditionalOnBean(Fabric8SecretsPropertySourceLocator.class) public SecretsWatcherChangeDetector busSecretsChangeWatcher(BusProperties busProperties, AbstractEnvironment environment, KubernetesClient kubernetesClient, - SecretsPropertySourceLocator secretsPropertySourceLocator, ConfigReloadProperties properties, + Fabric8SecretsPropertySourceLocator secretsPropertySourceLocator, ConfigReloadProperties properties, ConfigurationUpdateStrategy strategy, ConfigurationWatcherConfigurationProperties k8SConfigurationProperties, ThreadPoolTaskExecutor threadFactory) { @@ -121,10 +121,10 @@ public class ConfigurationWatcherAutoConfiguration { @Bean @ConditionalOnMissingBean(ConfigMapWatcherChangeDetector.class) - @ConditionalOnBean(ConfigMapPropertySourceLocator.class) + @ConditionalOnBean(Fabric8ConfigMapPropertySourceLocator.class) public ConfigMapWatcherChangeDetector busConfigMapChangeWatcher(BusProperties busProperties, AbstractEnvironment environment, KubernetesClient kubernetesClient, - ConfigMapPropertySourceLocator configMapPropertySourceLocator, ConfigReloadProperties properties, + Fabric8ConfigMapPropertySourceLocator configMapPropertySourceLocator, ConfigReloadProperties properties, ConfigurationUpdateStrategy strategy, ConfigurationWatcherConfigurationProperties k8SConfigurationProperties, ThreadPoolTaskExecutor threadFactory) { @@ -134,7 +134,7 @@ public class ConfigurationWatcherAutoConfiguration { @Bean @ConditionalOnMissingBean(SecretsWatcherChangeDetector.class) - @ConditionalOnBean(SecretsPropertySourceLocator.class) + @ConditionalOnBean(Fabric8SecretsPropertySourceLocator.class) public SecretsWatcherChangeDetector busSecretsChangeWatcher(BusProperties busProperties, AbstractEnvironment environment, KubernetesClient kubernetesClient, Fabric8SecretsPropertySourceLocator fabric8SecretsPropertySourceLocator, diff --git a/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-client-config-it/src/test/java/org/springframework/cloud/kubernetes/client/config/it/ConfigMapAndSecretIT.java b/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-client-config-it/src/test/java/org/springframework/cloud/kubernetes/client/config/it/ConfigMapAndSecretIT.java index 6f73abff..dfe1ce3f 100644 --- a/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-client-config-it/src/test/java/org/springframework/cloud/kubernetes/client/config/it/ConfigMapAndSecretIT.java +++ b/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-client-config-it/src/test/java/org/springframework/cloud/kubernetes/client/config/it/ConfigMapAndSecretIT.java @@ -163,7 +163,7 @@ public class ConfigMapAndSecretIT { data.replace("application.yaml", data.get("application.yaml").replace("from-config-map", "from-unit-test")); configMap.data(data); api.replaceNamespacedConfigMap(APP_NAME, NAMESPACE, configMap, null, null, null); - await().timeout(Duration.ofSeconds(15)) + await().timeout(Duration.ofSeconds(60)) .until(() -> rest.getForObject(MYPROPERTY_URL, String.class).equals("from-unit-test")); myProperty = rest.getForObject(MYPROPERTY_URL, String.class); assertThat(myProperty).isEqualTo("from-unit-test"); @@ -173,7 +173,7 @@ public class ConfigMapAndSecretIT { secretData.replace("my.config.mySecret", "p455w1rd".getBytes()); secret.setData(secretData); api.replaceNamespacedSecret(APP_NAME, NAMESPACE, secret, null, null, null); - await().timeout(Duration.ofSeconds(15)) + await().timeout(Duration.ofSeconds(60)) .until(() -> rest.getForObject(MYSECRET_URL, String.class).equals("p455w1rd")); mySecret = rest.getForObject(MYSECRET_URL, String.class); assertThat(mySecret).isEqualTo("p455w1rd");