Spring upgrade org.springframework.boot from 3.3.6 to 3.5.7#9253
Conversation
| liquibase.setContexts(StringUtils.collectionToCommaDelimitedString(properties.getContexts())); | ||
| liquibase.setDataSource(dataSource); | ||
| liquibase.setDefaultSchema(properties.getDefaultSchema()); | ||
| liquibase.setDropFirst(properties.isDropFirst()); | ||
| liquibase.setLabelFilter(properties.getLabelFilter()); | ||
| liquibase.setLabelFilter( | ||
| StringUtils.collectionToCommaDelimitedString(properties.getLabelFilter())); |
There was a problem hiding this comment.
These now only take in a string, which can accept a CSV liquibase/liquibase#6534
schreiaj
left a comment
There was a problem hiding this comment.
Would like to see clarification about why the changes in backend/src/test/java/gov/cdc/usds/simplereport/integration/SubmitTestResultIntegrationTest.java and backend/src/test/java/gov/cdc/usds/simplereport/integration/SubmitTestResultTestConfig.java were made here in the PR, but otherwise LGTM.
|
|
||
| @Test | ||
| void complete_submit_test_result_flow() throws IOException { | ||
| Date date = Date.from(Instant.parse("2023-05-24T19:33:06.472Z")); |
There was a problem hiding this comment.
What prompted this change? This seems to be new logic in a test or at least moving it from another file?
There was a problem hiding this comment.
Yeah, this was moved from SubmitTestResultTestConfig.java in order to use MockitoBeans and to fix this failing test.
Someone with more Java/Mockito/Bean knowledge may be able to explain this better, but from my understanding: MockitoBeans behave slightly differently from MockBeans in that setting dateGenerator and uuidGenerator as MockitoBeans in the test config would not initialize them on time for when the fhirQueueReportingService Bean is finally used by this test. As a result, this test would fail because the dateGenerator and uuidGenerator would be null when they are called further down the call stack.
The work around is to set and initialize them locally in the test case, and pass them to fhirQueueReportingService when it's finally called.
DavidMcClatchey
left a comment
There was a problem hiding this comment.
LGTM - the code, tests, and build+run 🚀 🚀 🚀
| testImplementation 'org.mockito:mockito-core' | ||
| testImplementation 'org.mockito:mockito-junit-jupiter' | ||
| testImplementation 'org.junit.jupiter:junit-jupiter' | ||
| testImplementation 'com.fasterxml.jackson.core:jackson-databind' | ||
|
|
||
| // used to autoconfigure WireMock for testing |
There was a problem hiding this comment.
we're we not pulling in mockito explicitly before?
edit: I guess this is a stupid question
There was a problem hiding this comment.
If I remember correctly, there was a change in transitive dependencies in spring-boot-starter-test between upgrades that required this.
e28b370
|
I think we could add the Resolves tag for this one too if we're including the latest from gradle: #9245 |
|
re: upgrading gradle It looks like the jump to 9.x is breaking. I would be more comfortable if we highest version of 8.x and address upgrading gradle in a separate PR (regardless of the breaking build) |
This reverts commit e28b370.
|



BACKEND PULL REQUEST
Related Issue
Resolves #9081
Stay up to date with the latest dependencies to ensure strong security and paying down tech debt
Changes Proposed
3.5.7as that was the latest patch version.8.14.3MockBeanandSpyBeanhave been deprecated, and migrated to their Mockito equivalents in our backend testsAdditional Information
spring-boot-starter-testthroughorg.skyscreamer:jsonassert:1.5.3depends oncom.vaadin.external.google:android-json, which seems like a version of org.json that was extracted from Android for general use.We explicitly depend on
org.json:json:20250517, which results in this warning when running tests:The story seems to be that
org.jsonat one point had an ambiguous license with the restriction "The software shall be used for good, not evil.". So JSONAssert and other framework authors moved away fromorg.json. However, since 2023,org.jsonremoved that license and simply claims "Public Domain". Now it's just a matter of time untilspring-boot-starter-testupdates to JSONAssert 2.0, which re-includes org.json.TLDR: We don't need to do anything here.
See:
spring-projects/spring-boot#41201
spring-projects/spring-boot#47385
skyscreamer/JSONassert#194
Testing
./gradlew clean && ./gradlew build --refresh-dependencieslocally