Skip to content

Commit 5cf51ba

Browse files
committed
Relax ordering assertion when testing resource provider
Flyway's org.flywaydb.core.internal.scanner.Scanner does not make any ordering guarantees so neither does our NativeImageResourceProvider. It also isn't required by the contract where a Collection is returned so we can relax the assertion in the test so that it doesn't care about the ordering. See gh-49661
1 parent e65732e commit 5cf51ba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/NativeImageResourceProviderCustomizerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void nativeImageResourceProviderShouldFindNestedMigrations() {
6767
Collection<LoadableResource> migrations = resourceProvider.getResources("V", new String[] { ".sql" });
6868
LoadableResource v1 = resourceProvider.getResource("V1__init.sql");
6969
LoadableResource v2 = resourceProvider.getResource("nested/V2__users.sql");
70-
assertThat(migrations).containsExactly(v1, v2);
70+
assertThat(migrations).containsExactlyInAnyOrder(v1, v2);
7171
}
7272

7373
@Test

0 commit comments

Comments
 (0)