zeppelin icon indicating copy to clipboard operation
zeppelin copied to clipboard

[ZEPPELIN-5612] Upgrade junit 4 to 5

Open huage1994 opened this issue 3 years ago • 9 comments

What is this PR for?

  1. Upgrade junit 4 to 5, then we can write junit 5 tests and migrate junit 4 tests to 5.
  2. Run the existing junit 4 tests on Junit 5 engine.

What type of PR is it?

[Improvement]

Todos

  • [ ] - Task

What is the Jira issue?

  • Open an issue on Jira https://issues.apache.org/jira/browse/ZEPPELIN-5612

How should this be tested?

CI pass

Screenshots (if appropriate)

Questions:

  • Does the licenses files need update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

huage1994 avatar Mar 20 '22 10:03 huage1994

I think it's good. Is there any pain point I should check?

jongyoul avatar Jun 03 '22 12:06 jongyoul

I think it's good. Is there any pain point I should check?

Hi @jongyoul , now this PR seems to cause frontend CI jobs to be canceled. frontend / run-e2e-tests-in-zeppelin-web (pull_request) Cancelled after 360m — run-e2e-tests-in-zeppelin-web .
Normally, the status of frontend CI jobs should be failure or success.

I haven't found the real reason for it for a long time but I would spend more time to fix it.

huage1994 avatar Jun 03 '22 13:06 huage1994

When I upgrade junit 4 to junit 5 , Frontend CI job would block at downloading dependency when mvn install the module k8s-standard, but it is ok to mvn package this module. It 's really weird that both mvn install and mvn package is OK in my local environment, this problem only happens in Github CI jobs.
It has costed me very much time, but hard to find the real reason.I would really appreciate if someone tell me the reason.

huage1994 avatar Sep 17 '22 16:09 huage1994

Not sure what is the root cause, maybe you can try upgrade surefire plugin to 3.x @huage1994

zjffdu avatar Sep 18 '22 08:09 zjffdu

I suspect the checkstyle plugin. This plugin produces a lot of the Maven warnings at the beginning. I've been wanting to fix this for a long time, but haven't gotten around to it yet.

Reamer avatar Sep 19 '22 07:09 Reamer

I suspect the checkstyle plugin. This plugin produces a lot of the Maven warnings at the beginning. I've been wanting to fix this for a long time, but haven't gotten around to it yet.

Agreed. We should have better idea to enforce to keep it. I'll think of it. :-)

jongyoul avatar Sep 19 '22 10:09 jongyoul

@zjffdu @Reamer @jongyoul , really thanks for helping out~ I'm going to test your guesses and continue to address this issue

huage1994 avatar Sep 19 '22 14:09 huage1994

I suspect the checkstyle plugin. This plugin produces a lot of the Maven warnings at the beginning. I've been wanting to fix this for a long time, but haven't gotten around to it yet.

Agreed. We should have better idea to enforce to keep it. I'll think of it. :-)

PR #4466 should improve the CheckStyle integration.

Reamer avatar Sep 20 '22 08:09 Reamer

Thank you. I'm checking the PR now

jongyoul avatar Sep 20 '22 08:09 jongyoul

@huage1994 My checkstyle pull request https://github.com/apache/zeppelin/pull/4466 was merged with the master. Can you please check if you still get the error when you run mvn install.

Reamer avatar Sep 30 '22 11:09 Reamer

@huage1994 My checkstyle pull request #4466 was merged with the master. Can you please check if you still get the error when you run mvn install.

Thanks @Reamer ! I'll try that.

huage1994 avatar Oct 01 '22 04:10 huage1994

Hi @jongyoul @zjffdu @Reamer . I tried your suggestion but the problem still exists.

I think there are some dependencies in launcher-k8s-standard conflict with junit 5, because Frontend CI runs well if I skip this module here.

It's really weird that Frontend CI job would block at downloading dependency only when mvn install the module launcher-k8s-standard, but it is ok to mvn package this module launcher-k8s-standard. And there is no special plugin goals bound to install phrase.

Now I'm trying to verify the dependencies in launcher-k8s-standard one by one.

huage1994 avatar Oct 11 '22 03:10 huage1994

I think it looks good overall. Just a few minor issues.

Hi @Reamer, really thanks for your useful advice. I've update my code and waiting for the CI result.

huage1994 avatar Nov 13 '22 04:11 huage1994