Class HqlSmokeIT


@Tag("integration") @ContextConfiguration public class HqlSmokeIT extends BaseDatabaseTest5
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-model that misses an HQL string will surface here.
  • HB6 SQM-translator regressions on novel shapes (sibling test HibernateSqmFragileShapesIT pins 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 StringBuilder or 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 from src/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.
  • Constructor Details

    • HqlSmokeIT

      public HqlSmokeIT()