EricGao888 commented on PR #11332: URL: https://github.com/apache/dolphinscheduler/pull/11332#issuecomment-1211054006
@ruanwenjun @kezhenxu94 @caishunfeng Finally I managed to remove the dependency of `jUnit 4` since it is wired, ugly and confusing to have two versions of `jUnit` in `pom.xml`. I have the same worries that ` if we still keep the Junit4, we need to constantly remind contributors to use Junit5`. However, even though I have removed the dependency of `jUnit 4`, contributors still could write `jUnit 4` fashion UTs as long as we use `junit-vintage-engine`. It is quite difficult to migrate all legacy tests in this PR. I will keep working on this but I prefer doing it iteratively. About `Powermock`, It seems we could use high version (greater than 3.4.0) `Mockito` to mock static methods and I've already added the dependency in this PR. I need more time to find out whether the latest `Mockito` could fully replace `Powermock` since we use `Powermock` quite a lot previously. Also, I find someone use `bytebuddy` to do some trick but I'm not sure whether this trick could apply here: https://git.stklcode.de/stklcode/juraclient/commit/c9444bbc971cd36f80824c3e7ec9baf8ecfbd676. But I believe we could get rid of `Powermock` as long as we set our minds to : ) For the rest of the legacy tests, we could migrate some of them easily with `Intellij`, but still, there are some complicated ones we need to do it manually. Above all, there are two action items after this PR, if you agree: - [ ] Remove dependency of `Powermock`. https://github.com/apache/dolphinscheduler/issues/11405. - [ ] Migrate legacy code and replace `junit-vintage-engine` with `junit-jupiter-engine`. Thanks -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
