Skip to content

DT-2754, DT-3166: Replace mockserver framework with wiremock#2860

Merged
rushtong merged 5 commits intodevelopfrom
gr-DT-2754-wiremock
Apr 11, 2026
Merged

DT-2754, DT-3166: Replace mockserver framework with wiremock#2860
rushtong merged 5 commits intodevelopfrom
gr-DT-2754-wiremock

Conversation

@rushtong
Copy link
Copy Markdown
Contributor

Addresses

https://broadworkbench.atlassian.net/browse/DT-2754
https://broadworkbench.atlassian.net/browse/DT-3166

Summary

Replace all mockserver library tests with wiremock. This PR is 95% Claude generated.


Have you read CONTRIBUTING.md lately? If not, do that first.

  • Label PR with a Jira ticket number and include a link to the ticket
  • Label PR with a security risk modifier [no, low, medium, high]
  • PR describes scope of changes
  • Get a minimum of one thumbs worth of review, preferably two if enough team members are available
  • Get PO sign-off for all non-trivial UI or workflow changes
  • Verify all tests go green
  • Test this change deployed correctly and works on dev environment after deployment

@rushtong rushtong marked this pull request as ready for review April 10, 2026 15:45
@rushtong rushtong requested a review from a team as a code owner April 10, 2026 15:45
@rushtong rushtong requested review from Copilot, fboulnois and otchet-broad and removed request for a team April 10, 2026 15:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Replaces the MockServer/Testcontainers-based HTTP mocking used in unit tests with an in-process WireMock setup, updating test helpers, JUnit listener wiring, and Maven dependencies accordingly.

Changes:

  • Removed MockServer helper classes/config and introduced WireMockTestHelper + WithWireMock utilities.
  • Updated affected unit tests to stub/verify HTTP interactions via WireMock.
  • Swapped Maven test dependencies from MockServer/Testcontainers to org.wiremock:wiremock-jetty12.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/test/resources/mvn.properties Removes MockServer version property from filtered test properties.
src/test/resources/META-INF/services/org.junit.platform.launcher.TestExecutionListener Switches global JUnit Platform listener from MockServer helper to WireMock helper.
src/test/java/org/broadinstitute/consent/http/WithWireMock.java Adds WireMock helper interface (stop/root URL utilities).
src/test/java/org/broadinstitute/consent/http/WithMockServer.java Removes MockServer/Testcontainers helper interface.
src/test/java/org/broadinstitute/consent/http/WireMockTestHelper.java Adds WireMock-based test helper + platform listener for server lifecycle.
src/test/java/org/broadinstitute/consent/http/util/HttpClientUtilTest.java Migrates HTTP caching/timeout tests to WireMock stubs/verifications.
src/test/java/org/broadinstitute/consent/http/service/UseRestrictionConverterTest.java Drops unnecessary inheritance from the removed MockServer helper.
src/test/java/org/broadinstitute/consent/http/service/SupportRequestServiceTest.java Migrates support-request HTTP tests to WireMock.
src/test/java/org/broadinstitute/consent/http/service/OntologyServiceTest.java Removes dependency on MockServer helper (now extends AbstractTestHelper).
src/test/java/org/broadinstitute/consent/http/service/NihServiceTest.java Migrates ECM calls mocking from MockServer to WireMock.
src/test/java/org/broadinstitute/consent/http/service/dao/SamDAOTest.java Migrates SamDAO HTTP stubbing to WireMock (including timeout/fault cases).
src/test/java/org/broadinstitute/consent/http/MockServerTestHelper.java Removes MockServer/Testcontainers-based listener/helper.
src/test/java/org/broadinstitute/consent/http/health/ElasticSearchHealthCheckTest.java Migrates ES healthcheck HTTP mocking to WireMock.
src/test/java/org/broadinstitute/consent/http/db/OidcAuthorityDAOTest.java Migrates OIDC discovery/token HTTP tests to WireMock.
pom.xml Replaces MockServer dependencies with WireMock Jetty 12 module and adds wiremock.version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@fboulnois fboulnois left a comment

Choose a reason for hiding this comment

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

👍

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@rushtong rushtong requested review from eweitz and kevinmarete April 10, 2026 15:58
@sonarqubecloud
Copy link
Copy Markdown

@rushtong rushtong changed the title DT-2754, DT-3166 Replace mockserver framework with wiremock DT-2754, DT-3166: Replace mockserver framework with wiremock Apr 10, 2026
@rushtong rushtong merged commit 5d23789 into develop Apr 11, 2026
14 checks passed
@rushtong rushtong deleted the gr-DT-2754-wiremock branch April 11, 2026 20:23
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.

4 participants