DT-3208: Run Synthetic Integration Tests as Unit Tests - #2891
Merged
Conversation
rushtong
marked this pull request as ready for review
May 1, 2026 22:49
rushtong
requested review from
Copilot,
fboulnois,
kevinmarete and
otchet-broad
and removed request for
a team
May 1, 2026 22:49
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to move the existing “smoke/integration” coverage into the normal mvn test run by running a full in-process Dropwizard application with stubbed external dependencies, and removing the separate BEE-based smoke-test workflow/profile setup.
Changes:
- Adds a
ContainerTestsbase class that boots the app viaDropwizardAppExtension, runs WireMock on:9999, and seeds synthetic baseline DB data. - Reworks/introduces integration tests (
StatusTests,UserTests) to hit live HTTP endpoints (/status,/liveness,/version,/api/user/me) against the in-process app. - Removes the dedicated smoke-test GitHub Actions workflow and the Maven profiles that previously gated integration tests.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/resources/consent-ci.yaml | Adds Dropwizard config intended for in-process integration tests. |
| src/test/java/org/broadinstitute/consent/integration/ContainerTests.java | New base class to boot the app, start WireMock, and seed the DB for integration tests. |
| src/test/java/org/broadinstitute/consent/integration/status/StatusTests.java | Switches status endpoint smoke checks to run against the in-process app. |
| src/test/java/org/broadinstitute/consent/integration/user/UserTests.java | Adds authenticated /api/user/me coverage across seeded synthetic users with Sam/ECM stubs. |
| src/test/java/org/broadinstitute/consent/integration/README.md | Updates integration-test documentation to describe the new execution model. |
| src/test/java/org/broadinstitute/consent/integration/IntegrationTestHelper.java | Removes the old helper that hit a deployed environment over HTTP. |
| pom.xml | Removes the Maven profiles that previously configured/isolated integration tests. |
| DEVNOTES.md | Documents how integration tests now run and how the DB is provided. |
| .github/workflows/smoke-tests.yaml | Deletes the BEE-based smoke-test workflow. |
Comments suppressed due to low confidence (1)
pom.xml:45
- The PR removes the only Maven Surefire configuration (previously in profiles). This drops the Mockito
-javaagentargLine that enables static/constructor mocking (e.g., tests usingmockStatic/mockConstruction), which will likely break the existing unit test suite. Please add an explicitmaven-surefire-pluginconfiguration under<build><plugins>that preserves the priorargLinebehavior (including JaCoCo’s argLine) so Mockito instrumentation remains enabled.
<properties>
<java.version>25</java.version>
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
<maven.version>3.9.11</maven.version>
<liquibase.version>4.33.0</liquibase.version>
<dropwizard.version>5.0.1</dropwizard.version>
<logback.version>1.5.25</logback.version>
<postgres.version>42.7.10</postgres.version>
<surefire.version>3.5.5</surefire.version>
<swagger.ui.version>5.32.5</swagger.ui.version>
<swagger.ui.path>META-INF/resources/webjars/swagger-ui/${swagger.ui.version}/</swagger.ui.path>
<wiremock.version>3.13.2</wiremock.version>
<junit.version>6.0.3</junit.version>
<mockito.version>5.23.0</mockito.version>
<sonar.plugin.version>5.6.0.6792</sonar.plugin.version>
<netty.override.version>4.2.12.Final</netty.override.version>
<spotless.version>3.4.0</spotless.version>
<jetty.version>12.1.8</jetty.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sonar.organization>broad-databiosphere</sonar.organization>
<sonar.projectKey>DataBiosphere_consent</sonar.projectKey>
<sonar.projectName>consent</sonar.projectName>
</properties>
<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
<testResource>
|
otchet-broad
reviewed
May 4, 2026
| database: | ||
| driverClass: org.postgresql.Driver | ||
| user: test | ||
| password: test |
Contributor
There was a problem hiding this comment.
This is the configuration of TestContainer's postgres implementation. No secret here.
otchet-broad
approved these changes
May 4, 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-3208
Summary
Previously, integration/smoke tests were:
This approach was slow, expensive, and fragile — a BEE outage meant no smoke coverage. A quick scan of recent coverage workflow runs shows no significant difference in run times between this branch and develop which means we're saving 100% of the time spent in the smoke test action and gaining slightly more coverage in this PR.
Changes
What we lose
It is important to call out the one feature smoke tests did previously which was to upload test results to a big query table. This was originally built to support pact testing but never gained traction. It was cumbersome to configure correctly due to xml formatting requirements and we haven't looked at the data in years. I see no value in maintaining it.
Test infrastructure (ContainerTests)
Test coverage
Removed
Updated
How to run
Have you read CONTRIBUTING.md lately? If not, do that first.