Skip to content

Commit

Permalink
Pin rewrite-maven-plugin version for migration test
Browse files Browse the repository at this point in the history
  • Loading branch information
davidh44 committed Nov 11, 2024
1 parent ab0f411 commit a3607cc
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIf;
import software.amazon.awssdk.testutils.SdkVersionUtils;
import software.amazon.awssdk.utils.Logger;

public class MavenProjectTest {
Expand Down Expand Up @@ -69,16 +67,17 @@ private static void deleteTempDirectories() throws IOException {
}

@Test
// @EnabledIf("versionAvailable")
@Disabled("Test is flaky")
@EnabledIf("versionAvailable")
void mavenProject_shouldConvert() throws IOException {
verifyTransformation();
verifyCompilation();
}

private static void verifyTransformation() throws IOException {
List<String> rewriteArgs = new ArrayList<>();
addAll(rewriteArgs, "mvn", "org.openrewrite.maven:rewrite-maven-plugin:run",
// pin version since updates have broken tests
String rewriteMavenPluginVersion = "5.43.0";
addAll(rewriteArgs, "mvn", "org.openrewrite.maven:rewrite-maven-plugin:" + rewriteMavenPluginVersion + ":run",
"-Drewrite.recipeArtifactCoordinates=software.amazon.awssdk:v2-migration:"+ getMigrationToolVersion() + "-PREVIEW",
"-Drewrite.activeRecipes=software.amazon.awssdk.v2migration.AwsSdkJavaV1ToV2");

Expand Down

0 comments on commit a3607cc

Please sign in to comment.