Skip to content

test: Remove Mockito and align JUnit with a BOM - #326

Merged
bgrozev merged 1 commit into
masterfrom
deps/test-deps
Nov 24, 2026
Merged

bgrozev merged 1 commit into
masterfrom
deps/test-deps

Conversation

@bgrozev

@bgrozev bgrozev commented Nov 24, 2026

Copy link
Copy Markdown
Member

Remove Mockito from the test dependencies, and align the JUnit versions with the JUnit BOM.

  • PeriodicRunnableTests was the only Mockito user. It mocked an ExecutorService that runs each submitted task at once. A small AbstractExecutorService stub now does the same.
  • Remove mockito-core.
  • 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. With the BOM, all JUnit Platform artifacts are 1.14.4.

Test scope only. The published artifact does not change.

- 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

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.96%. Comparing base (64fd5fd) to head (9c04012).

Additional details and impacted files

Impacted file tree graph

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

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64fd5fd...9c04012. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JonathanLennox JonathanLennox left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@bgrozev
bgrozev merged commit 7880576 into master Nov 24, 2026
6 of 7 checks passed
@bgrozev
bgrozev deleted the deps/test-deps branch November 24, 2026 21:59
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.

2 participants