| Metadata | Value |
|---|---|
| Status | Completed |
| Version | 1.0.0 |
| Last Updated | 2026-01-26 |
| Author | Sangita Grantha Architect |
Fix backend:dal test failures caused by DatabaseFactory hardcoding the PostgreSQL driver, preventing H2 based tests from running.
During TRACK-019 verification, backend:dal tests failed with RuntimeException. Investigation revealed that DatabaseFactory.kt explicitly sets driverClassName = "org.postgresql.Driver". However, unit tests use an H2 in-memory database (jdbc:h2:mem:...), leading to a driver mismatch.
DatabaseFactory.kt - Make driver class name configurable or auto-detect.driverClassName to connect(), default to PostgreSQL if standard config, or detect based on URL../gradlew :modules:backend:dal:test.DatabaseFactory.DatabaseFactory to support H2 driver.UserRepositoryTest to ensure build stability without compromising production code.