DT-2754, DT-3166: Replace mockserver framework with wiremock#2860
Merged
DT-2754, DT-3166: Replace mockserver framework with wiremock#2860
Conversation
Contributor
There was a problem hiding this comment.
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+WithWireMockutilities. - 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.
src/test/java/org/broadinstitute/consent/http/db/OidcAuthorityDAOTest.java
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
kevinmarete
approved these changes
Apr 11, 2026
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.



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.