From 134064365b476419d2d3c09342d2bbb9238c884f Mon Sep 17 00:00:00 2001 From: Sam Snyder Date: Tue, 19 Mar 2024 14:16:33 -0700 Subject: [PATCH] Update test expectations --- .../UpdateMysqlDriverArtifactIdTest.java | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/testWithSpringBoot_2_5/java/org/openrewrite/java/spring/boot2/UpdateMysqlDriverArtifactIdTest.java b/src/testWithSpringBoot_2_5/java/org/openrewrite/java/spring/boot2/UpdateMysqlDriverArtifactIdTest.java index 757598adb..d7cd33ce2 100644 --- a/src/testWithSpringBoot_2_5/java/org/openrewrite/java/spring/boot2/UpdateMysqlDriverArtifactIdTest.java +++ b/src/testWithSpringBoot_2_5/java/org/openrewrite/java/spring/boot2/UpdateMysqlDriverArtifactIdTest.java @@ -155,27 +155,33 @@ void switchArtifactIdAndUpdateVersionNumber() { plugins { id 'java' } - + repositories { mavenCentral() } - + dependencies { runtimeOnly 'mysql:mysql-connector-java:8.0.30' } + tasks.withType(Test).configureEach { + useJUnitPlatform() + } """, """ plugins { id 'java' } - + repositories { mavenCentral() } - + dependencies { runtimeOnly 'com.mysql:mysql-connector-j:8.0.33' } + tasks.withType(Test).configureEach { + useJUnitPlatform() + } """) ); } @@ -199,6 +205,9 @@ void doNotPinWhenNotVersioned() { dependencies { runtimeOnly 'mysql:mysql-connector-java' } + tasks.withType(Test).configureEach { + useJUnitPlatform() + } """, spec -> spec.after(gradle -> { Matcher version = Pattern.compile("2\\.5\\.\\d+").matcher(gradle); assertThat(version.find()).describedAs("Expected 2.5.x in %s", gradle).isTrue(); @@ -217,6 +226,9 @@ void doNotPinWhenNotVersioned() { dependencies { runtimeOnly 'com.mysql:mysql-connector-j' } + tasks.withType(Test).configureEach { + useJUnitPlatform() + } """.formatted(version.group()); }) )