mengw15 commented on issue #8104:
URL: https://github.com/apache/texera/issues/8104#issuecomment-5462134244

   Closing as not planned: measured against the code, three of the five items 
are
   unreachable by design and the other two are already covered.
   
   **Already covered**
   
   - `handleExecutionError` (490-496) — `SyncExecutionResourceSpec` already 
pins every
     clause: the four keywords each on their own message, the plain-error arm, 
and the
     `null`-message short-circuit.
   - The request-limit caps (138-146) — already executed by the existing
     `executeWorkflowSync` case. `Math.min` compiles to a method call rather 
than a
     branch, so a request below the cap and one above it take the same single 
path;
     neither adds coverage.
   
   **Unreachable by design**
   
   - `validateWorkflow` (905-925) has zero call sites — nothing in the 
repository, in any
     language, invokes it (agent-service's same-named TypeScript function is 
unrelated).
     It is reachable by reflection, but a test there would only cement dead 
code and make
     its deletion look like a regression. The spec's header comment already 
records this.
   - `shutdownPreviousExecution` (350-360) cannot be pinned in principle: its 
entire body
     sits inside `catch (Exception) => warn`, so removing either null guard 
turns a no-op
     into a *swallowed* NPE — no observable difference for an assertion to 
catch.
   - `killExecution`'s `client.shutdown()` line (368) needs an `AmberClient` 
double, and
     `AmberClient`'s constructor needs a started `AmberRuntime`. (The spec 
header says
     amber's test scope has no mocking library; that part is out of date, 
`amber/build.sbt`
     does declare scalamock — but ScalaMock still generates a subclass whose 
constructor
     runs, so the conclusion holds.)
   
   **What is genuinely uncovered**
   
   Only `killExecution`'s `catch` arm (376-379), which is reachable without a 
client. Too
   small to carry an issue of its own; worth folding into the next change that 
touches this
   file.
   
   A more useful follow-up than this issue would be deleting 
`validateWorkflow`, since
   nothing calls it.
   


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