You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When I use the jvm-test-suite plugin simulation with OpenRewrite, the configuration of the testing suite sources does not work, so no tests can run.
When I use two plugins, jvm-test-suite and java, and run integrationTest with the command ./gradlew integrationTest, it executes the test in the BasicTests class and shows the failed test results because the tests in BasicTests always fail. However, when I uncomment the OpenRewrite plugin in the build.gradle file and run the ./gradlew integrationTest command again, it does nothing and shows Build Successful, which means no tests were executed.
Hi @thaitangluc2412 ; thanks for the detailed report; no idea what might go into that not working as expected. As a workaround you might be able to run rewrite recipes exclusively through an init script instead of adding the plugin to your build.gradle file.
In particular, your test and integrationTest source sets are both pointing to the source folder src/test/java. If you were to run build, you should actually see your test run twice with each task based upon the configuration that you've shared here.
With the jvm-test-suite plugin, Gradle intends for you to use a different folder for each test suite (ie. src/integrationTest/java) normally. Due to the clash, the OpenRewrite plugin disabled the integration test compile task which then means the outputs from that are not available for the test task resulting in a successful build.
To expand upon Tim's earlier workaround, you either need to:
Use separate source folders for the additional test suite(s)
Use OpenRewrite via the init script method documented here.
NOTE: I do find it a little weird that the OpenRewrite Gradle plugin is disabling other stuff during it's configuration phase. I know why it's doing it, but doing so results in weird issues such as this one.
Description
When I use the jvm-test-suite plugin simulation with OpenRewrite, the configuration of the testing suite sources does not work, so no tests can run.
Basic project
![Screenshot 2024-06-05 at 16 33 10](https://private-user-images.githubusercontent.com/67372806/336778238-db6ced05-4567-43d5-b3c9-471ecf35344e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NDU2MzIsIm5iZiI6MTcxOTc0NTMzMiwicGF0aCI6Ii82NzM3MjgwNi8zMzY3NzgyMzgtZGI2Y2VkMDUtNDU2Ny00M2Q1LWIzYzktNDcxZWNmMzUzNDRlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDExMDIxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMwMmMyNzMzYzc2ZTU1NThlYmRlYWY5Y2MwODlhNWQ5ZDhlOTdlMzVhN2JlMTA2OThiMmM3ZGM2M2FiYWVjOTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.wP4RBOGMPrkCsHfuBIxTgehqw28tjcaorI1asODqdwM)
build.gradle file
Steps to Reproduce
When I use two plugins,
jvm-test-suite
andjava
, and run integrationTest with the command./gradlew integrationTest
, it executes the test in the BasicTests class and shows the failed test results because the tests in BasicTests always fail. However, when I uncomment the OpenRewrite plugin in the build.gradle file and run the./gradlew integrationTest
command again, it does nothing and showsBuild Successful
, which means no tests were executed.Screenshots
Environment
Openrewrite version: 6.15.1
Gradle version: 8.7
Java version: 17
junit-jupiter version: 5.10.2
Additional Context
I downgraded the OpenRewrite version to 5.7.0, but the problem remains the same
The text was updated successfully, but these errors were encountered: