Skip to content

test: share the service-check slice configuration - #350

Merged
fjlopez merged 1 commit into
devfrom
test/317-liquibase-slices
Oct 21, 2026
Merged

fjlopez merged 1 commit into
devfrom
test/317-liquibase-slices

Conversation

@fjlopez

@fjlopez fjlopez commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Why

ServiceCheckStoreTest, AffectedApplicationsTest, ServiceHealthFilterTest, ServiceAccessSummaryTest, and ServiceCheckDispatcherTest each @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. AffectedApplicationsTest uses the suite database (AutoConfigureTestDatabase.Replace.NONE). Hikari connections do not autocommit, so the transactional slice removes its rows. Every existing assertion stays. ApplicationContactMigrationTest and SequenceMigrationTest still 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

  • The five slice classes passed.
  • With those classes running first, TaskRepositoryDataRestTest still sees 45 tasks and LiquibaseSeedCanaryTest still sees 15 STM_TREE_NOD rows.
  • Pre-commit ./gradlew spotlessCheck, ./gradlew test, and ./gradlew jacocoTestReport passed. The replay onto origin/dev only kept the existing #313 changelog bullet.

@fjlopez
fjlopez merged commit 05a35cf into dev Oct 21, 2026
1 check passed
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.

1 participant