diff --git a/src/test/java/org/openrewrite/java/migrate/UpgradeJavaVersionTest.java b/src/test/java/org/openrewrite/java/migrate/UpgradeJavaVersionTest.java index 40c38ba387..6f8cf2dc73 100644 --- a/src/test/java/org/openrewrite/java/migrate/UpgradeJavaVersionTest.java +++ b/src/test/java/org/openrewrite/java/migrate/UpgradeJavaVersionTest.java @@ -77,32 +77,6 @@ void mavenUpgradeFromJava8ToJava17ViaProperties() { ); } - @Test - void mavenUpgradeShouldDeclaredVersionInParent() { - rewriteRun( - spec -> spec.recipe(new UpgradeJavaVersion(17)), - pomXml( - //language=xml - """ - - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 3.3.3 - - - - com.mycompany.app - my-app - 1 - - """, - spec -> spec.markers(new JavaVersion(UUID.randomUUID(), "", "", "11.0.15+10", "11.0.15+10")) - ) - ); - } - @Test void mavenUpgradeFromJava8ToJava17ViaConfiguration() { rewriteRun( diff --git a/src/test/java/org/openrewrite/java/migrate/maven/UpdateMavenProjectPropertyJavaVersionTest.java b/src/test/java/org/openrewrite/java/migrate/maven/UpdateMavenProjectPropertyJavaVersionTest.java index 31fb89ebf5..969aa2224d 100644 --- a/src/test/java/org/openrewrite/java/migrate/maven/UpdateMavenProjectPropertyJavaVersionTest.java +++ b/src/test/java/org/openrewrite/java/migrate/maven/UpdateMavenProjectPropertyJavaVersionTest.java @@ -192,4 +192,28 @@ void addReleaseIfNoOtherChangeIsMade() { ) ); } + + @Test + void mavenUpgradeShouldUseDeclaredVersionInParent() { + rewriteRun( + pomXml( + //language=xml + """ + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.3.3 + + + + com.mycompany.app + my-app + 1 + + """ + ) + ); + } }