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 to JUnit 5 from JUnit 4 in related to spring
module
#5036
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.
Could you also remove AutoConfigureMetrics
in the actuator test classes? 😉
e.g. ArmeriaSpringActuatorAutoConfigurationSecureTest
...ux-autoconfigure/src/test/java/com/linecorp/armeria/spring/web/reactive/ByteBufLeakTest.java
Show resolved
Hide resolved
I tried to change it, but those annotations have changed since 3.0.0, so I didn't modify the code to work with 2.x. |
Ah, you changed it in the test of |
# Conflicts: # spring/boot3-autoconfigure/src/test/java/com/linecorp/armeria/spring/ArmeriaAutoConfigurationTest.java
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 a lot for cleaning this up, @heowc!
Q: Is there a reason that you didn't migrate the tests in the actuator modules? |
|
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 cleanup! Left a minor comment 👍
...3-autoconfigure/src/test/java/com/linecorp/armeria/spring/ArmeriaServerConfiguratorTest.java
Outdated
Show resolved
Hide resolved
...re/src/test/java/com/linecorp/armeria/spring/web/reactive/ArmeriaClientConfiguratorTest.java
Outdated
Show resolved
Hide resolved
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #5036 +/- ##
============================================
- Coverage 74.20% 74.19% -0.01%
Complexity 19464 19464
============================================
Files 1671 1671
Lines 71721 71721
Branches 9182 9182
============================================
- Hits 53219 53216 -3
- Misses 14180 14185 +5
+ Partials 4322 4320 -2 ☔ View full report in Codecov by Sentry. |
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 cleanup 👍 🙇 👍
Right. I was confused. |
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 cleaning up, @heowc! ❤️
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 a lot, @heowc! 🙇
Motivation:
Starting from spring boot 2.4.0, junit5 is recommended. That's why we need to respond in the same way.
Modifications:
org.junit.Test
->org.junit.jupiter.api.Test
org.junit.runner.RunWith
@AutoConfigureMetrics
to@AutoConfigureObservability
TestRule globalTimeout
->@Timeout(10)
Result: