Conversation
d746b82 to
d8fcf2c
Compare
769a7e9 to
66afcf3
Compare
… classes with JUnit5
…es, remove junit4 from core classpath
| 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") |
There was a problem hiding this comment.
Is string/replace still necessary if most of the tests are migrated already ?
There was a problem hiding this comment.
I think we can drop that later.
The use case is as follows:
-
You drop
junit4=truefrommongodb/gradle.properties, and execute./gradlew spotlessApply. It would use the replacements to automatically replace the bits inmongodbmodule. -
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?
There was a problem hiding this comment.
Unfortunately, assertEquals, assertTrue, and frields have different APIs between 4 and 5, so they can't be converted with a regexp :-(
|
@vlsi does it make sense to squash commits ? There is no much information in intermediate changes. |
|
I think it helps to review the changes. For instance, mechanical edits like "alter package names" are not that interesting, and it is even hard to view in GitHub UI. We have 3700+ commits, so 7 vs 1 won't make a difference. |
Checklist:
@TestAssert@ParameterizedAssumeOut of scope: cassandra, mongodb, elasticsearch, geode, linq4j (see
junit4=trueingradle.properties)This removes JUnit4 from most of the modules, so there will be less confusion between
@Testannotations.