Class HqlSmokeIT
java.lang.Object
ubic.gemma.core.util.test.BaseTest5
ubic.gemma.core.util.test.BaseDatabaseTest5
ubic.gemma.persistence.util.HqlSmokeIT
Mass parse-only smoke test for every statically-extractable HQL string in
gemma-core/src/main/java. Closes the HQL coverage gap from
handoffs/HQL_COVERAGE_AUDIT_2026_05_25.md — 166 directly-uncovered
methods + 57 ambiguous-by-name. The test treats every extracted query
uniformly, so already-covered queries get a redundant safety net + the
uncovered ones get their first test reference.
What this test catches
- HQL syntax regressions (missing space, mistyped keyword).
- Unknown entity / property references — caught at SQM-translation
time, NOT at runtime. A rename in
gemma-modelthat misses an HQL string will surface here. - HB6 SQM-translator regressions on novel shapes (sibling test
HibernateSqmFragileShapesITpins the known-fragile shapes; this test catches the long tail).
What this test does NOT catch
- Behavioural / data-shape bugs (no rows fetched; no asserts on results).
- Query performance — flagged as a follow-up only when something is OBVIOUSLY pathological; the bar is "this query won't even parse," not "this query is slow."
- Dynamic HQL built via
StringBuilderor runtime interpolation — 216 callsites are skipped by the extractor for that reason. Those need targeted DAO tests; not in scope here.
Manifest
The HQL strings come fromsrc/test/resources/hql-smoke/hql-manifest.json, regenerated by
src/test/resources/hql-smoke/extract_hql.py when HQL changes.
Re-run the extractor + commit the regenerated manifest as part of any PR
that modifies HQL.
Tag
@Tag("integration") — runs in failsafe, skipped from surefire.
The Spring + Hibernate context boot is the only meaningful cost; per-query
SQM parse + emit on an empty H2 schema is sub-millisecond.-
Nested Class Summary
Nested classes/interfaces inherited from class BaseDatabaseTest5
BaseDatabaseTest5.BaseDatabaseTestContextConfiguration -
Field Summary
Fields inherited from class BaseDatabaseTest5
sessionFactory -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class BaseDatabaseTest5
flushAndClearSession
-
Constructor Details
-
HqlSmokeIT
public HqlSmokeIT()
-