In updating my project from Boot 2.3.4 to 2.3.5, i have some integration tests that are failing, due to what looks like a profile order loading issue.
My integration test has the following header to set the profiles for the test
@ActiveProfiles({"shared-elasticsearch", "es-common-test", "test-model-obj-index", "bootRun"})
shared-elasticsearch
has a spring.profiles.include
value pulling in shared-http-client
, which in turn has an include of shared-enc
.
When executing the test with 2.3.4 vs 2.3.5, i see the active profiles log message change:
2.3.4 - which is the logical order, including the sub-included profiles described above:
The following profiles are active: shared-elasticsearch,shared-http-client,shared-enc,es-common-test,test-model-obj-index,bootRun
2.3.5 - the ordering here looks to be ordered lexigraphically:
The following profiles are active: bootRun,es-common-test,shared-elasticsearch,shared-http-client,shared-enc,test-model-obj-index
As a result, my test fails in 2.3.5 due to a configuration properties validation error on a NotEmpty annotated field.
I see there are notes about profile inclusion in upcoming changes in 2.4 but didn't expect this would be back ported / affective to 2.3.x
Comment From: wilkinsona
Thanks for the report and sorry for the inconvenience. This is a duplicate of https://github.com/spring-projects/spring-boot/issues/24037.