-
Notifications
You must be signed in to change notification settings - Fork 798
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
JUnit5 migration #908
JUnit5 migration #908
Conversation
Signed-off-by: Greg Eales <[email protected]>
Signed-off-by: Greg Eales <[email protected]>
Signed-off-by: Greg Eales <[email protected]>
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<!-- Add plugin versions for reproducible builds. Versions for default bindings are taken from --> | ||
<!-- https://github.com/apache/maven/tree/maven-3.8.1/maven-core/src/main/resources/META-INF/plexus --> |
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.
Is this change okay in this PR? I really only needed to update surefire/failsafe...
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.
Hi Greg, thanks a lot for updating JUnit, and sorry for the delay. Looks good, I just have commented a small question on one line :)
@@ -213,6 +225,7 @@ | |||
<show>public</show> | |||
<skippedModules>benchmarks,examples,integration-tests,integration_tests,,simpleclient,simpleclient_bom,simpleclient_caffeine,simpleclient_common,simpleclient_dropwizard,simpleclient_graphite_bridge,simpleclient_guava,simpleclient_hibernate,simpleclient_hotspot,simpleclient_httpserver,simpleclient_jetty,simpleclient_jetty_jdk8,simpleclient_log4j,simpleclient_log4j2,simpleclient_logback,simpleclient_pushgateway,simpleclient_servlet,simpleclient_servlet_common,simpleclient_servlet_jakarta,simpleclient_spring_boot,simpleclient_spring_web,simpleclient_tracer,simpleclient_vertx,simpleclient_vertx4</skippedModules> | |||
<excludePackageNames>io.prometheus.metrics.expositionformats.generated.*</excludePackageNames> | |||
<sourcepath>src/main/java;src/main/generated</sourcepath> |
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.
This line has been added here. Is that on purpose? Seems unrelated to JUnit.
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.
This was needed to get ./mvnw javadoc:jar
to work. Probably because I updated the version of maven-javadoc-plugin
.
I have tried to compare the generated javadocs and they look substantially the same, with only minor differences in how the navigation works. I see no differnces in the content.
To check, I cloned the repo to client_java_copy
and did ./mvnw javadoc:jar
in both dirs to generate the javadocs.
Then I did for file in **/target/apidocs; do diff "$file" "../client_java_copy/${file}" >> diff.txt; done
to capture the diffs to
diff.txt
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.
@fstab Is there anything more you you need for this?
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.
Sorry for dropping the ball here, I put it back on my TODO list and will get back to you soon 🤞.
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.
@fstab any progress?
@@ -19,15 +19,14 @@ | |||
# ---------------------------------------------------------------------------- | |||
|
|||
# ---------------------------------------------------------------------------- | |||
# Maven Start Up Batch script | |||
# Apache Maven Wrapper startup batch script, version 3.2.0 |
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 wonder if we should move all these maven related changes in separate PR, to make things easier to review, WDYT?
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 don't mind
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.
Hey guys, I thought this PR had been forgotten about.
Do you need me to look at these issues?
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'm just doing the conversion to junit 5 in #1092
after I converted to assertj, this pr became pretty much obsolete
@@ -24,7 +24,7 @@ private Volume(Path tmpDir) { | |||
|
|||
public static Volume create(String prefix) throws IOException, URISyntaxException { | |||
Path targetDir = Paths.get(Volume.class.getResource("/").toURI()).getParent(); | |||
Assert.assertEquals("failed to locate target/ directory", "target", targetDir.getFileName().toString()); | |||
Assertions.assertEquals("target", targetDir.getFileName().toString(), "failed to locate target/ directory"); |
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.
Across the modules we have a mix of static imports of Assertions
method and explicit calls like here. I wonder if we should use static imports everywhere to improve readability.
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.
yes, and assertj would also be great
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.
fixed in #1092
<dependency> | ||
<groupId>org.junit</groupId> | ||
<artifactId>junit-bom</artifactId> | ||
<version>5.10.1</version> |
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.
5.11.1 is out now
@0x006EA1E5 junit 5 migration is done - please add anything missing in a new pr maven wrapper is also updated |
Addresses #907