-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to gradle 8.4, junit 5. Fix configuration cache issues. #4069
Conversation
4923003
to
e1376e9
Compare
be39b71
to
77f7f3d
Compare
Note: removal of "public" in all test methods is due to junit5 upgrade (triggered 1500 sonar code smell warnings...) |
b78c65f
to
1a14b0d
Compare
"kokoro-windows" check failed, but I don't have access to view the check's output. |
f6c4727
to
2229911
Compare
Updated by removing the workaround for gradle which only applies to v6 (this PR bumps to v8.3). PR still fails on kokoro-windows but I'm afraid I don't have access to logs so I'm going to need your help to diagnose what's up with that. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs 83.8% Coverage The version of Java (11.0.20.1) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs 84.7% Coverage The version of Java (11.0.20.1) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
The windows issues are related to windows fs things I believe:
|
This PR is almost too large to review. Can you find a way to separate the parts and we can look into getting it in? Perhaps separates out the gradle update, the plugin updates and Junit5 updates per project? |
Hmmm probably a little difficult though I'd agree the PR is pretty big, but most of it is silly stuff like removing "public" from test methods (junit 5 thing, triggered a lot of code smells in Sonar). If you think it's worth the effort I'll try to give it a shot |
Alright lemme give this review a shot and see how it goes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so I started going through this, and it looks like there's still a lot of Junit4 (rules, assert, etc) -- I did not comment on all of them. I still think it makes sense to decouple the junit5 updates from the other changes related to cache configuration here.
// /* GOOGLE JAVA FORMAT */ | ||
// | ||
// /* CHECKSTYLE */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a few of these comment //
things sprinkled around in this file, probably needs a cleanup
import org.junit.Assert; | ||
import org.junit.Assume; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The move to junit5 is somewhat incomplete here?
org.junit.Assert
-> org.junit.jupiter.api.Assertions
org.junit.Assume
-> org.junit.jupiter.api.Assumptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might be true for across all test files?
import picocli.CommandLine; | ||
|
||
public class JarCommandTest { | ||
class JarCommandTest { | ||
|
||
@ClassRule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ClassRule
-> @ExtendWith
+1 to @loosebazooka. @wwadge would it be possible to split this up into smaller PRs? It looks like we are trying to solve multiple problems here but it may help to break it down problem by problem. |
@mpeddada1 yes I'll try to do that |
Closing in favour of: #4139 |
This is a large MR, but mostly touches unit tests.
Fixes #4062 #3132 #4070