spring-projects-experimental / spring-boot-migrator

Spring Boot Migrator (SBM) is a tool for automated code migrations to upgrade or migrate to Spring Boot
Apache License 2.0
439 stars 88 forks source link

Fix `OpenRewriteMavenBuildFileTest.getEffectiveDependencies()` in GH action #901

Open fabapp2 opened 1 year ago

fabapp2 commented 1 year ago
          With 3a5a26b the `OpenRewriteMavenBuildFileTest.getEffectiveDependencies()` faiuls in GH action but "works in my machine". Currently out of scope, fix later. Disabling the test for now.
Error:  Tests run: 46, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 31.799 s <<< FAILURE! - in org.springframework.sbm.project.buildfile.OpenRewriteMavenBuildFileTest
Error:  getEffectiveDependencies  Time elapsed: 0.017 s  <<< FAILURE!
java.lang.AssertionError: 
Expected size: 3 but was: 2 in:
[<dependency>
   <groupId>javax.annotation</groupId>
   <artifactId>javax.annotation-api</artifactId>
   <version>1.3.2</version>
   <type>jar</type>
   <scope>test</scope>
</dependency>,
    <dependency>
   <groupId>com.example</groupId>
   <artifactId>module2</artifactId>
   <version>1.0</version>
   <type>jar</type>
   <scope>compile</scope>
</dependency>]

The problem seems to be that in GH build the transitive dependency of module2 is not retrieved.

Originally posted by @fabapp2 in https://github.com/spring-projects-experimental/spring-boot-migrator/issues/900#issuecomment-1700892520