aglinxinyuan opened a new issue, #7677:
URL: https://github.com/apache/texera/issues/7677

   ### Task Summary
   
   
`amber/src/main/scala/org/apache/texera/web/resource/dashboard/user/workflow/WorkflowExecutionsResource.scala`
 sits at **83.5% of 316 lines** behind a 44-test spec, and the residue is 
concentrated in four endpoints that are all reachable with nothing but the 
embedded test DB: `getWorkflowResultDownloadability`, `exportResultToLocal`, 
`retrieveInteractionHistory`, and the warehouse guard on 
`retrieveWorkflowRuntimeStatistics`.
   
   The interesting part is not the percentage — it is that several regions are 
*line-covered today but not pinned*, so the existing tests would survive 
deleting the logic they appear to exercise. Anyone picking this up should plan 
on mutation-checking rather than trusting coverage.
   
   Traps found while scoping it, each of which yields a test that looks strong 
and pins nothing:
   
   1. **Asserting `ex.getMessage.contains("byo")`** on the warehouse refusal. 
`byo` is a substring of the URI the test itself constructed, so every candidate 
message contains it — including the guard's *other* branch and any message that 
merely echoes the URI. Assert a string that cannot come from the input.
   2. **Seeding only non-downloadable datasets.** If every `DATASET` row a spec 
creates has `isDownloadable = false`, then the predicate deciding *whether an 
operator is restricted at all* is unpinned — the fixture supplies the answer 
the production filter is supposed to compute. Seed a downloadable foreign 
dataset too and assert it is absent.
   3. **Exporting without seeding a computing unit or execution.** 
`ResultExportService` then bails at its first line for *any* `(workflowId, 
computingUnitId)`, and the single-operator path collapses both failure causes 
into one message — so the ids are unobservable and can be perturbed freely. 
Send two operators to take the zip branch, over a seeded execution.
   4. **Asserting only `result.isEmpty`** on `retrieveInteractionHistory`. 
Three such tests still leave the endpoint's actual product — the replay 
destination ids — unasserted anywhere, so the whole `Some` branch can be 
replaced by `List()`.
   5. **Acyclic fixtures only.** The BFS termination check is never 
load-bearing unless some fixture's links actually form a cycle. Note a test for 
this must be bounded: a plain call hangs the suite rather than failing it.
   6. **`logLocation = ""` everywhere.** `sql/texera_ddl.sql:299` leaves 
`log_location` nullable with no default, but if every fixture writes the empty 
string the null half of `logLocation != null && nonEmpty` is never exercised.
   
   ### Task Type
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [x] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [ ] Other
   


-- 
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