Repository navigation
test: share the service-check slice configuration - #350
Merged
Merged
Conversation
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.
Why
ServiceCheckStoreTest,AffectedApplicationsTest,ServiceHealthFilterTest,ServiceAccessSummaryTest, andServiceCheckDispatcherTesteach@ImportAutoConfiguration(LiquibaseAutoConfiguration.class)and kept their extra beans in a private nested@TestConfiguration. That nested class is part of the Spring test context key, so each slice applied the master changelog on its own context.What changed
The five slices import
ServiceCheckSliceConfiguration.AffectedApplicationsTestuses the suite database (AutoConfigureTestDatabase.Replace.NONE). Hikari connections do not autocommit, so the transactional slice removes its rows. Every existing assertion stays.ApplicationContactMigrationTestandSequenceMigrationTeststill apply the changelog on their own.Fixes #317
Scope
Test configuration for the five service-check JPA slices, plus the
[Unreleased]changelog bullet. No production code.Blast Radius
Those slices now load the shared beans: service-check store, health query, affected applications, access summaries, usage queries, the dispatcher, a fixed clock, in-flight permits, the test probe executor, and a mock
ServiceAccessCheckExecutor. They share one Liquibase-migrated suite database and roll back. Seed counts and task pages stay at the changelog baseline.Verification
TaskRepositoryDataRestTeststill sees 45 tasks andLiquibaseSeedCanaryTeststill sees 15STM_TREE_NODrows../gradlew spotlessCheck,./gradlew test, and./gradlew jacocoTestReportpassed. The replay ontoorigin/devonly kept the existing#313changelog bullet.