Repository navigation
test: Remove Mockito and align JUnit with a BOM - #326
Merged
Merged
Conversation
- Replace the mocked ExecutorService in PeriodicRunnableTests with a small stub that runs each task on the calling thread. - Remove the mockito-core dependency. - Remove junit-jupiter-api. The junit-jupiter aggregate includes it. - Import org.junit:junit-bom and remove the versions of the JUnit artifacts. kotest 5.9.1 pulls junit-platform-suite-api 1.8.2, and the BOM aligns it with the other JUnit Platform artifacts (1.14.4).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #326 +/- ##
============================================
- Coverage 44.21% 43.96% -0.25%
+ Complexity 1449 1443 -6
============================================
Files 166 166
Lines 11223 11223
Branches 1666 1666
============================================
- Hits 4962 4934 -28
- Misses 5638 5673 +35
+ Partials 623 616 -7 see 10 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
JonathanLennox
approved these changes
Nov 24, 2026
JonathanLennox
left a comment
Member
There was a problem hiding this comment.
Looks good. PeriodicRunnable only calls executor.submit, and the stub runs it inline as the mock did.
This and #327 both add a <dependencyManagement> block at the same place in pom.xml, so the second one to merge will need a rebase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove Mockito from the test dependencies, and align the JUnit versions with the JUnit BOM.
PeriodicRunnableTestswas the only Mockito user. It mocked anExecutorServicethat runs each submitted task at once. A smallAbstractExecutorServicestub now does the same.mockito-core.junit-jupiter-api. Thejunit-jupiteraggregate includes it.org.junit:junit-bomand remove the versions of the JUnit artifacts. kotest 5.9.1 pullsjunit-platform-suite-api1.8.2. With the BOM, all JUnit Platform artifacts are 1.14.4.Test scope only. The published artifact does not change.