You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/08/10 13:45:06 UTC

[GitHub] [dolphinscheduler] kezhenxu94 commented on pull request #11332: [Improvement][UT] Upgrade jUnit to 5.+ (#10976)

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

   > > > 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.
   
   This is totally OK to me, "migrations" are always huge changes...
   
   > 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 hope we could finally get rid of powermock one day, did you find any alternative to Powermock in JUnit5 platform? Or it's just impossible? 


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org