Skip to content

Drop mockito-scala-scalatest test dependency#1476

Open
ddworak wants to merge 1 commit intomasterfrom
remove-mockito-scala-dep
Open

Drop mockito-scala-scalatest test dependency#1476
ddworak wants to merge 1 commit intomasterfrom
remove-mockito-scala-dep

Conversation

@ddworak
Copy link
Copy Markdown
Member

@ddworak ddworak commented Apr 17, 2026

Summary

  • Removes the mockito-scala-scalatest dependency (and its transitive Mockito/ByteBuddy chain) from restJvmDeps.
  • Deletes RestServletTest, the single file that used it. Its 13 scenarios were already covered end-to-end by JettyRestCallTest, SttpRestCallTest, and EndpointsIntegrationTest, which exercise the real RestServlet behind a real Jetty server — strictly higher fidelity than the mock-based variant.
  • Ports the one scenario that wasn't already covered against a real servlet (mid-stream failure → server closes the response) into StreamingRestApiTestScenarios via the pre-existing errorStream fixture. Uses an explicit .timeout(5.seconds) so a servlet regression that fails to close the stream fails loudly rather than hanging.

QA impact

  • 12/13 former scenarios: now exercised through real HTTP + real Jetty + real RestServlet via JettyRestCallTest — higher coverage than before.
  • Mid-stream-error scenario: reimplemented as an integration test, named "mid-stream server error propagates to client" in StreamingRestApiTestScenarios.

Test plan

  • sbt rest/test — 128 tests pass across 11 suites.
  • sbt rest-jetty/test — 28 tests including the new case pass.
  • sbt compile Test/compile — clean across all modules.
  • Repo-wide grep for mockito/org.mockito — zero hits.

🤖 Generated with Claude Code

RestServletTest was the only consumer; its 13 scenarios are already
covered end-to-end by JettyRestCallTest, SttpRestCallTest, and
EndpointsIntegrationTest, which run the real RestServlet behind a real
Jetty server. The one previously-unique scenario (mid-stream failure
closing the servlet output stream) is ported to
StreamingRestApiTestScenarios via the existing errorStream fixture, so
JettyRestCallTest now verifies it against a real HTTP client.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ddworak ddworak force-pushed the remove-mockito-scala-dep branch from 0f7f123 to 2586f62 Compare April 24, 2026 09:58
@ddworak ddworak marked this pull request as ready for review April 24, 2026 10:04
@ddworak ddworak requested a review from sebaciv April 24, 2026 10:04
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.

1 participant