You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/12/03 18:53:35 UTC

[GitHub] [calcite] vlsi commented on a change in pull request #1621: [CALCITE-2457] JUnit4 -> JUnit5

vlsi commented on a change in pull request #1621: [CALCITE-2457] JUnit4 -> JUnit5
URL: https://github.com/apache/calcite/pull/1621#discussion_r353360271
 
 

 ##########
 File path: build.gradle.kts
 ##########
 @@ -402,6 +397,21 @@ allprojects {
                 java {
                     targetExclude(*javaccGeneratedPatterns + "**/test/java/*.java")
                     licenseHeaderFile(licenseHeaderFile)
+                    if (!project.props.bool("junit4", default = false)) {
+                        replace("junit5: Test", "org.junit.Test", "org.junit.jupiter.api.Test")
 
 Review comment:
   I think we can drop that later.
   
   The use case is as follows:
   1) You drop `junit4=true` from `mongodb/gradle.properties`, and execute `./gradlew spotlessApply`. It would use the replacements to automatically replace the bits in `mongodb` module.
   
   2) When somebody implemented JUnit4-based test, then they rebase on top of master.
   The replacement rules would convert the code to the new format automatically!
   That is nice, isn't it?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services