Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(prometheus/test): replace deprecated test application contex…
…t initializer class during upgrade to spring boot 2.6.x (#1015) While upgrading spring boot 2.6.15 and spring cloud 2021.0.8, encounter below error in kayenta-prometheus module during test compilation: ``` > Task :kayenta-prometheus:compileTestJava FAILED /kayenta/kayenta-prometheus/src/test/java/com/netflix/kayenta/prometheus/config/PrometheusHealthConfigurationTest.java:28: error: cannot find symbol import org.springframework.boot.test.context.ConfigFileApplicationContextInitializer; ^ symbol: class ConfigFileApplicationContextInitializer location: package org.springframework.boot.test.context 1 error ``` The root cause is the removal of `ConfigFileApplicationContextInitializer` class which got deprecated since [spring boot 2.4.x](https://javadoc.io/doc/org.springframework.boot/spring-boot-test/2.4.4/deprecated-list.html) in favour of `ConfigDataApplicationContextInitializer` class from [spring boot 2.6.x](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.6-Release-Notes#deprecations-from-spring-boot-24). To fix this issue replacing the deprecated class with new class. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information