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 unit tests to JUnit 5 (Part 1) #471
Conversation
Codecov Report
@@ Coverage Diff @@
## master #471 +/- ##
============================================
- Coverage 69.9% 69.89% -0.02%
Complexity 3149 3149
============================================
Files 325 325
Lines 12672 12674 +2
Branches 1348 1348
============================================
Hits 8858 8858
- Misses 2963 2966 +3
+ Partials 851 850 -1
Continue to review full report at Codecov.
|
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.
🙇
List<Endpoint> decoded = decoder.decode(HOST_AND_PORT_LIST.stream().collect(Collectors.joining("\n"))); | ||
void decode() { | ||
final EndpointListDecoder<String> decoder = EndpointListDecoder.TEXT; | ||
final List<Endpoint> decoded = decoder.decode(String.join("\n", HOST_AND_PORT_LIST)); |
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.
👍
...om/linecorp/centraldogma/server/internal/storage/repository/cache/CachingRepositoryTest.java
Outdated
Show resolved
Hide resolved
@@ -149,7 +148,7 @@ private static void verifyTwoIndependentCommands(Replica replica, | |||
Command<?> command1, | |||
Command<?> command2) { | |||
final AtomicReference<Command<?>> lastCommand = new AtomicReference<>(); | |||
verify(replica.delegate, timeout(Duration.ofSeconds(2)).times(1)).apply(argThat(c -> { | |||
verify(replica.delegate, timeout(TimeUnit.SECONDS.toMillis(2)).times(1)).apply(argThat(c -> { |
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.
Nice 👍
I found timeout(Duration)
has been reverted since 3.2.3 due to Android compatibility issue.
mockito/mockito#1843
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.
Big thanks to @KarboniteKream 🙇♂️
Thanks a lot and sorry I'm late! |
This PR migrates part of unit tests to JUnit 5.
Changes:
ProjectServiceV1Test
to reduce the number of Central Dogma instancesZooKeeperCommandExecutorTest
assertThat().hasSize()
where applicable