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

   Closing this: everything it asks for that can be tested already is, and the 
rest is behind a gate the test JVM cannot open.
   
   **Already covered** by `ComputingUnitManagingResourceSpec` (21 tests today):
   
   - the `local` arm's `uri.forall(_.trim.isEmpty)` — "reject a local unit 
without a URI" and "reject a local unit whose URI is blank", with the accepted 
path covered by "create a local unit and report it as owned, Running and 
writable";
   - `getComputingUnitResourceLimit`'s local arm — "return NaN limits for an 
owned local unit";
   - `renameComputingUnit` (line 647) and the access branch at line 584 — eight 
tests covering owner, non-owner, READ grantee, WRITE grantee, blank name, admin 
without access, missing unit, and a database failure.
   
   **Not reachable.** The whole kubernetes arm — the cpu/memory/gpu option 
checks, `shmSize` parsing, the shared-memory bound, the JVM-heap bound and the 
accepted path — sits behind `getSupportedComputingUnitTypes`, and 
`kubernetes.conf`'s `enabled` defaults to `false`. The module has no 
`src/test/resources` overriding it and the flag is read into a load-time `val`, 
so it cannot be flipped from a test. `createWorkflowComputingUnit` rejects the 
type at the supported-type gate first; the spec records this at line 259, and 
that gate itself is covered by "reject the kubernetes type while it is disabled 
in the configuration".
   
   **Dead branch.** `case _ => "Unsupported computing-unit type: …"` cannot run 
either: `getSupportedComputingUnitTypes` admits only `local` and `kubernetes` 
(`case _ => false`), so an unknown literal is rejected by the earlier "Unit 
type '…' is not allowed" check — which is covered by "reject an unknown unit 
type with ForbiddenException".
   
   The file's 51.68 % is dominated by the `KubernetesClient` paths, which this 
issue already puts out of scope.
   
   Reopening makes sense if the kubernetes gate becomes testable — a 
`src/test/resources` override, or reading the flag through something injectable 
instead of a load-time `val`.
   


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