ruanwenjun commented on PR #11332:
URL: 
https://github.com/apache/dolphinscheduler/pull/11332#issuecomment-1210690585

   > > > BTW, there are two ways to fully migrate those tests from jUnit 4 to 
jUnit 5:
   > > > 
   > > > 1. We keep both versions of jUnit dependencies and migrate those UTs 
gradually with `DSIP-10` [[DSIP-10][Unit Tests] Improve DolphinScheduler unit 
tests #10573](https://github.com/apache/dolphinscheduler/issues/10573).
   > > > 2. Remove the dependency of jUnit 4 and migrate all the UTs with IDE 
`inspections` in this PR.
   > > > 
   > > > However, I think the second method is a bit risky.
   > > > WDYT? @caishunfeng @kezhenxu94 @SbloodyS @ruanwenjun
   > > 
   > > 
   > > I prefer the second way.
   > 
   > I just tried migrating all the UTs and got blocked.
   > 
   > Specifically speaking, there are two risks:
   > 
   > 1. We need to switch all the UTs to use jUnit 5 and `Spotless` will 
automatically reformat them. I've tried it, there would be 333 files modified.
   > 2. We used `powermock` quite a lot in the project and `powermock` does not 
support `jUnit 5` as stated in [[Improvement][UT] Upgrade junit to 5.+ #10976 
(comment)](https://github.com/apache/dolphinscheduler/issues/10976#issuecomment-1207427898).
 It is hardly possible to refactor all the code using `powermock` in one PR.
   > 
   > The real issue blocking me is the second one. May I ask whether there is a 
good way, or some kind of workaround for the second point? @ruanwenjun 
@kezhenxu94
   
   I just worry if we still keep the Junit4, we need to constantly remind 
contributors to use Junit5.


-- 
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]

Reply via email to