-
Notifications
You must be signed in to change notification settings - Fork 184
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
Migrate servicetalk-client-api-internal
from jUnit4 to jUnit5
#1608
Conversation
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.
Thanks for the PR @amitvc!
Please, make sure that the build runs correctly. Currently, quality
task failed with:
Execution failed for task ':servicetalk-client-api-internal:pmdTest'.
> 35 PMD rule violations were found. See the report at: file:///home/runner/work/servicetalk/servicetalk/servicetalk-client-api-internal/build/reports/pmd/test.html
...t/java/io/servicetalk/client/api/internal/AbstractRequestConcurrencyControllerMultiTest.java
Outdated
Show resolved
Hide resolved
...a/io/servicetalk/client/api/internal/AbstractRequestConcurrencyControllerOnlySingleTest.java
Outdated
Show resolved
Hide resolved
…untimeOnly to build.gradle
@idelpivnitskiy pushed another revision. Successfully ran ./gradlew --parallel clean quality locally as well as test. |
The CI reports:
This happens because CI always cherry-picks changes from PR to the up-to-date Please, merge the |
servicetalk-client-api-internal
from jUnit4 to jUnit5
@idelpivnitskiy thanks for the review. I have merged the main branch into mine. Hopefully, the build will go through. I will work on other packages in the list from the original issue. |
@amitvc it was not enough just to merge
And make sure it succeeds. |
@idelpivnitskiy thanks for the hint. Indeed when I run on this locally it fails. I am fixing this now. |
Thank you @amitvc ! |
Motivation:
JUnit 5 leverages features from Java 8 or later, such as lambda functions, making tests more powerful and easier to maintain.
JUnit 5 has added some very useful new features for describing, organizing, and executing tests. For instance, tests get better display names and can be organized hierarchically.
JUnit 5 is organized into multiple libraries, so only the features you need are imported into your project. With build systems such as Maven and Gradle, including the right libraries is easy.
JUnit 5 can use more than one extension at a time, which JUnit 4 could not (only one runner could be used at a time). This means you can easily combine the Spring extension with other extensions (such as your own custom extension).
Modifications:
Unit tests have been migrated from JUnit 4 to JUnit 5
Result:
Module servicetalk-client-api-internal now runs tests using JUnit 5