Commits
Tarun Sukhani authored 8748e753aeb
test(jpa): add HikariCP lazy-tx regression coverage (PF-108) Follow-up from PF-106 (lazy JPA EntityManager acquisition). The framework had no JPA test apparatus to assert the headline acceptance criterion directly: a handler that does not call JPA.em never acquires a HikariCP connection. Scaffold the minimum JPA wiring in the integration testapp — H2 in-memory datasource via %test.db=mem, a trivial Note entity, and four endpoints: /ping + /pingRo (no em() call, readonly and read-write branches) plus /count + /countRo (em().createQuery to materialize the EM on both branches). JpaLazyPoolTest watches HikariPoolMXBean.getActiveConnections() from a daemon poller during 50-way concurrent load. The /ping test asserts max active stays at zero on both readonly branches — pre-PF-106 this would climb to ~50 because withTransaction eagerly opened an EM and began a JDBC transaction. The /count test asserts max active rises above zero, which is the false-positive guard: the assertion passes on both PF-106-materialised and pre-PF-106 code paths because em() forces acquisition under both. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>