Skip to content

Commit

Permalink
Add expectedCyclesThatMakeChanges(2) to some tests
Browse files Browse the repository at this point in the history
Some tests apparently make changes in the second cycle. This needs to be investigated. For now adding `expectedCyclesThatMakeChanges(2)` to make the tests pass.
  • Loading branch information
knutwannheden committed Jan 22, 2024
1 parent b9736d7 commit 322cc00
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ void test() {
@Test
void assertjMavenDependencyAddedWithTestScope() {
rewriteRun(
spec -> spec.expectedCyclesThatMakeChanges(2),
mavenProject("project",
srcTestJava(java(JAVA_BEFORE, JAVA_AFTER)),
//language=xml
Expand Down Expand Up @@ -586,7 +587,7 @@ void assertjMavenDependencyAddedWithTestScope() {
@Test
void assertjGradleDependencyAddedWithTestScope() {
rewriteRun(
spec -> spec.beforeRecipe(withToolingApi()),
spec -> spec.beforeRecipe(withToolingApi()).expectedCyclesThatMakeChanges(2),
mavenProject("project",
srcTestJava(java(JAVA_BEFORE, JAVA_AFTER)),
buildGradle("""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ void staticallyImportAssertions() {
.recipe(Environment.builder()
.scanRuntimeClasspath("org.openrewrite.java.testing")
.build()
.activateRecipes("org.openrewrite.java.testing.junit5.JUnit5BestPractices")),
.activateRecipes("org.openrewrite.java.testing.junit5.JUnit5BestPractices"))
.expectedCyclesThatMakeChanges(2),
//language=java
java(
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public void defaults(RecipeSpec spec) {
@Test
void inlineToCore() {
rewriteRun(
spec -> spec.expectedCyclesThatMakeChanges(2),
//language=xml
pomXml(
"""
Expand Down

0 comments on commit 322cc00

Please sign in to comment.