Skip to content
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

Closed
wants to merge 3 commits into from
Closed

JUnit5 migration #908

wants to merge 3 commits into from

Conversation

0x006EA1E5
Copy link
Contributor

Addresses #907

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 -->
Copy link
Contributor Author

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...

Copy link
Member

@fstab fstab left a 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>
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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?

Copy link
Member

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 🤞.

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind

Copy link
Contributor Author

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?

Copy link
Member

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");
Copy link
Contributor

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.

Copy link
Member

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

Copy link
Member

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>
Copy link
Contributor

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

@zeitlinger
Copy link
Member

zeitlinger commented Oct 7, 2024

@0x006EA1E5 junit 5 migration is done - please add anything missing in a new pr

maven wrapper is also updated

@zeitlinger zeitlinger closed this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants