The GitHub Actions job "Required Checks" on texera.git/main has failed. Run started by GitHub user github-merge-queue[bot] (triggered by github-merge-queue[bot]).
Head commit for run: 9fa612401790f866d1e58a94f70744c996a2f696 / Meng Wang <[email protected]> test(amber): add unit test coverage for UserQuotaResource (#7168) ### What changes were proposed in this PR? Adds `UserQuotaResourceSpec` for `UserQuotaResource` (previously ~0% coverage, no spec). The suite runs against embedded Postgres via `MockTexeraDB` and seeds users / workflows / versions / executions / datasets through the generated DAOs. 13 tests, each starting from a clean slate (so they are order-independent): - `getUserCreatedWorkflow` — empty list when the user owns no workflows; the owned workflows with their id / name / creation time when `WORKFLOW_OF_USER` is seeded. - `getUserAccessedWorkflow` — empty list with no grants; the accessible workflow ids from `WORKFLOW_USER_ACCESS`. - `getUserQuotaSize` — empty array with no executions; the assembled per-execution `resultBytes` / `runTimeStatsBytes` / `logBytes` (seeded across `WORKFLOW_EXECUTIONS.RUNTIME_STATS_SIZE`, `OPERATOR_PORT_EXECUTIONS.RESULT_SIZE`, and `OPERATOR_EXECUTIONS.CONSOLE_MESSAGES_SIZE`). - The JAX-RS endpoints (`getCreatedWorkflow`, `getAccessedWorkflow`, `getUserQuota`, `getCreatedDatasets`) via a `new SessionUser`, covering the thin delegation wrappers; `getCreatedDatasets` covers the empty case and the created-datasets case (size is deterministically 0 — the size calculation is disabled in the current dataset implementation). - `deleteExecutionCollection` and the `deleteCollection` endpoint — assert the execution row is removed from `WORKFLOW_EXECUTIONS`. No production code was changed. ### Any related issues, documentation, discussions? Closes #7162 ### How was this PR tested? New unit tests, run locally against embedded Postgres: ``` sbt "WorkflowExecutionService/testOnly org.apache.texera.web.resource.dashboard.user.quota.UserQuotaResourceSpec" # Tests: succeeded 13, failed 0 sbt "WorkflowExecutionService/Test/scalafmtCheck" "WorkflowExecutionService/Test/scalafix --check" # clean ``` The failure path was verified by deliberately breaking an assertion and confirming the suite goes red. To keep the suite deterministic, the `creationTime` assertion compares against the DB round-tripped value rather than the in-memory timestamp (Postgres rounds the stored value, so an exact in-memory comparison would be flaky). ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8 [1M context]) Report URL: https://github.com/apache/texera/actions/runs/30659407692 With regards, GitHub Actions via GitBox
