mengw15 opened a new pull request, #7255:
URL: https://github.com/apache/texera/pull/7255

   ### What changes were proposed in this PR?
   
   Extends `SiteSettingsSpec` (previously only exercised the pure 
`parseOrDefault`
   helper) onto `MockTexeraDB` so `SqlServer.createDSLContext()` resolves to the
   embedded Postgres, then covers the DB-hit paths that were red. 6 new tests 
take
   `SiteSettings` to 100% (jacoco: 98/98 instructions, 23/23 lines):
   
   - `getInt` — returns the stored value when the key is present, the default 
when
     the key is absent, and the default when the stored value is non-numeric
     (the parse-failure branch).
   - `getLong` — returns the stored long value.
   - `upsert` — inserts a new row, then overwrites its value and `updated_by`.
   - `insertIfAbsent` — inserts when absent and leaves an existing value 
untouched.
   
   The existing `parseOrDefault` cases are kept as-is. No production code 
changed.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7253.
   
   ### How was this PR tested?
   
   `sbt "DAO/testOnly *SiteSettingsSpec"` — 11 passed (5 existing + 6 new) 
against
   the embedded Postgres, with `upsert` re-run in isolation to rule out
   order-dependence. `sbt "DAO/jacoco"` confirms `SiteSettings` is fully 
covered.
   The failure path was verified by breaking an assertion (1 failed, non-zero 
exit),
   and `Test/scalafmtCheck` + `Test/scalafix --check` are clean.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8 [1M context])
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to