Skip to content

test: reuse the suite Spring context where behavior allows it - #351

Merged
fjlopez merged 1 commit into
devfrom
test/315-unique-spring-contexts
Oct 22, 2026
Merged

fjlopez merged 1 commit into
devfrom
test/315-unique-spring-contexts

Conversation

@fjlopez

@fjlopez fjlopez commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #315

Summary

  • Tests that can reuse the suite context no longer boot their own application: spatial reference, user-position business logic, and user-position Data REST.
  • UserChecksServiceTest calls getWarnings without Spring. JsonWebTokenServiceTest loads only JsonWebTokenService with a fixed clock.
  • Password reset, MIA render security, language change, task literal enrollment, and database connection tests stay on their own context and name why.

Test plan

  • ./gradlew compileTestJava
  • Focused tests for the edited classes, including UniqueSpringContextTest
  • Pre-commit ./gradlew test on H2

User checks and JWT tests no longer boot the application. Spatial
reference, user-position logic, and user-position Data REST reuse an
existing suite context. Classes that mock, spy, or use the mail profile
name why they stay unique.
@fjlopez
fjlopez merged commit 8d3bea8 into dev Oct 22, 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