Skip to content

Add unit test coverage for operator utility classes (OperatorDescriptorUtils, DistributedAggregation, URLFetchUtil) #5795

Description

@aglinxinyuan

Task Summary

Three small utility classes/objects under common/workflow-operator/ have no <srcClassName>Spec.scala. They underpin numerical-partition behavior across worker counts (OperatorDescriptorUtils), the distributed-aggregate contract every aggregator obeys (DistributedAggregation), and the user-facing URL-fetch retry path (URLFetchUtil).

Scope

Source class Lines What's currently un-pinned
common/workflow-operator/.../util/OperatorDescriptorUtils.scala 52 equallyPartitionGoal(goal, workers) sums to goal; ranges where goal < workers, goal == workers, goal > workers; remainder lands on the first goal % workers slots; toImmutableMap round-trip
common/workflow-operator/.../aggregate/DistributedAggregation.scala 52 case-class equality + per-field accessors; end-to-end inititeratemergefinalAgg worked example (running average)
common/workflow-operator/.../source/fetcher/URLFetchUtil.scala 43 success path returns Some(stream); failure path retries N times and returns None; default retries == 5

Out of scope

No production-code changes. One <srcClassName>Spec.scala per source class.

Task Type

  • Testing / QA

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions