Task Summary
computing-unit-managing-service/src/main/scala/org/apache/texera/service/util/ComputingUnitHelpers.scala (0% coverage) has getComputingUnitStatus and getComputingUnitMetrics, both switching on WorkflowComputingUnit.getType. The local and unknown-type branches are pure and unit-testable without a cluster (construct the jOOQ WorkflowComputingUnit pojo via setType(...), no DB). The kubernetes branch calls the static KubernetesClient and needs a mock seam.
Behavior to cover
getComputingUnitStatus with type local -> Running
getComputingUnitStatus with an unknown / other type -> Pending
getComputingUnitMetrics with type local -> WorkflowComputingUnitMetrics("NaN", "NaN")
getComputingUnitMetrics with an unknown type -> WorkflowComputingUnitMetrics("NaN", "NaN")
- The
kubernetes branch (calls KubernetesClient.getPodByName / getPodMetrics) needs a mock seam on the static KubernetesClient — cover once that's introduced; out of scope for the pure branches above.
Task Type
Task Summary
computing-unit-managing-service/src/main/scala/org/apache/texera/service/util/ComputingUnitHelpers.scala(0% coverage) hasgetComputingUnitStatusandgetComputingUnitMetrics, both switching onWorkflowComputingUnit.getType. Thelocaland unknown-type branches are pure and unit-testable without a cluster (construct the jOOQWorkflowComputingUnitpojo viasetType(...), no DB). Thekubernetesbranch calls the staticKubernetesClientand needs a mock seam.Behavior to cover
getComputingUnitStatuswith typelocal->RunninggetComputingUnitStatuswith an unknown / other type ->PendinggetComputingUnitMetricswith typelocal->WorkflowComputingUnitMetrics("NaN", "NaN")getComputingUnitMetricswith an unknown type ->WorkflowComputingUnitMetrics("NaN", "NaN")kubernetesbranch (callsKubernetesClient.getPodByName/getPodMetrics) needs a mock seam on the staticKubernetesClient— cover once that's introduced; out of scope for the pure branches above.Task Type