Hi,

Yes, the maven_install.json is a generated file from the WORKSPACE.  I'm
guessing that
https://github.com/apache/incubator-heron/blob/master/maven_install.json#L3056


is coming from a transitive dependency from powermock here:
https://github.com/apache/incubator-heron/blob/2190502da0ad723db86a13216f5d9acd0b4c6474/WORKSPACE#L128

Saad, we do have a lot of usages of powermock in the codebase so if
upgrading that automatically pulls in junit5 I'd guess that will be fine.
Of course upgrading Powermock will have it's own challenges as well.
Another way you could go is using both of the below dependencies.

https://mvnrepository.com/artifact/org.junit.vintage/junit-vintage-engine
https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine

This way you won't have to upgrade every single junit 4 test to start
migrating to junit 5.  I am not sure how this will affect Powermock.

Hope this helps,

Josh


On Fri, Oct 15, 2021 at 6:16 PM Saad Ur Rahman <[email protected]>
wrote:

> Hi Huijun,
>
> maven_install.json should be created automatically by Bazel. I think what
> I need to do is update WORKPLACE, but I think the JUnit and Mockito are
> loaded as dependencies for PowerMock. The only Java testing framework I see
> in WORKPLACE is PowerMock, so I guess I would need to update that to force
> a JUnit upgrade?
>
>
> On 2021/10/15 21:19:05, H W <[email protected]> wrote:
> > If I understand correctly, change this line,
> >
> https://github.com/apache/incubator-heron/blob/master/maven_install.json#L3056
> > .
> > "junit:junit:4.12" ->  "junit:junit:5.x"
> >
> >
> > On Fri, Oct 15, 2021 at 9:03 AM Saad Ur Rahman <[email protected]
> >
> > wrote:
> >
> > > Hello Everyone,
> > >
> > > Can anyone guide me on how I can update the JUnit 4 dependency to
> JUnit 5
> > > (Jupiter)? I would like to try and upgrade this dependency and see if
> it
> > > breaks anything. If all is well with the update to JUnit 5 I shall try
> and
> > > update PowerMock and Mockito. Upgrading all of these will allow us to
> write
> > > cleaner and more comprehensive tests.
> > >
> > >
> > > /Saad
> > >
> >
>

Reply via email to