Skip to content

Order of profiles in tests is not preserved #26004

@tomasz0801

Description

@tomasz0801

Annotation @ActiveProfiles doesn't preserve the order of defined profiles in tests in spring boot 2.3.5.RELEASE
I have defined two profiles (europe and belgium) and marked test class with @ActiveProfiles({"europe", "belgium"})
Profiles have been loaded in alphabetical order instead of defined in the annotation.

I wrote test for that case.
It fails due to unexpected behavior
ffffffff

Log from context startup during test execution
2020-10-31 02:00:03.091 INFO 15818 --- [ main] c.e.d.DemoProfilesApplicationTests : The following profiles are active: belgium,europe

In spring boot 2.3.4.RELEASE same test pass

Metadata

Metadata

Assignees

Labels

in: testIssues in the test modulestatus: backportedAn issue that has been backported to maintenance branchestype: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions