Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin rewrite-maven-plugin version for migration test #5708

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
davidh44 marked this conversation as resolved.
Show resolved Hide resolved
"-Drewrite.recipeArtifactCoordinates=software.amazon.awssdk:v2-migration:"+ getMigrationToolVersion() + "-PREVIEW",
"-Drewrite.activeRecipes=software.amazon.awssdk.v2migration.AwsSdkJavaV1ToV2");

Expand Down
Loading