Skip to content

Fix/sonrqube h2 database#19

Merged
profotoce59 merged 3 commits into
mainfrom
fix/sonrqube_h2_database
Feb 27, 2026
Merged

Fix/sonrqube h2 database#19
profotoce59 merged 3 commits into
mainfrom
fix/sonrqube_h2_database

Conversation

@profotoce59

Copy link
Copy Markdown
Collaborator

To fix failing contextLoads tests when PostgreSQL is not available (especially in CI), we implemented the following:

Added H2 test dependency in [pom.xml]
Kept test profile usage with @activeprofiles("test") in SpringBootJavaRandomUserApplicationTests.
Updated Sonar GitHub Actions workflow to:
generate [application-test.properties] from APPLICATION_TEST_PROPERTIES secret,

New secret has been added to the GitHub secret : APPLICATION_TEST_PROPERTIES
spring.datasource.url=jdbc:h2:mem:testdb;MODE=PostgreSQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.username=<any_username>
spring.datasource.password=
spring.sql.init.mode=never

@sonarqube-xpeho

Copy link
Copy Markdown

@Theo-lbg Theo-lbg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@profotoce59 profotoce59 merged commit b74f516 into main Feb 27, 2026
4 checks passed
@profotoce59 profotoce59 deleted the fix/sonrqube_h2_database branch February 27, 2026 14:24
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.

4 participants