Description
Increase History Server test coverage by adding unit tests for pure functions.
Each item should be a small, self-contained change consisting primarily of a add or extend _test.go file with table-driven test cases. No production code changes are expected.
Reproducing the numbers
Measured on master @ eed5b24:
cd historyserver
go test -coverprofile=cover.out ./pkg/... ./cmd/...
# total
go tool cover -func=cover.out | tail -1
# -> total: (statements) 40.6%
# line-level HTML report, useful for picking the branches worth pinning
go tool cover -html=cover.out
Current coverage by package
| Package |
Coverage |
pkg/storage/clustermetadata |
97.9% |
pkg/storage/clusterlogs |
96.6% |
pkg/eventserver |
64.3% |
pkg/collector/eventcollector |
62.6% |
pkg/compression |
62.1% |
pkg/storage/gcs |
59.8% |
pkg/collector/logcollector |
40.2% |
pkg/historyserver |
39.5% |
pkg/eventserver/types |
29.7% |
pkg/utils |
27.1% |
pkg/storage/s3 |
0.0% |
pkg/storage/azureblob |
0.0% |
pkg/storage/aliyunoss/ray |
0.0% |
| total |
40.6% |
Files that need test cases
Each item is independent.
Description
Increase History Server test coverage by adding unit tests for pure functions.
Each item should be a small, self-contained change consisting primarily of a add or extend _test.go file with table-driven test cases. No production code changes are expected.
Reproducing the numbers
Measured on
master@ eed5b24:Current coverage by package
pkg/storage/clustermetadatapkg/storage/clusterlogspkg/eventserverpkg/collector/eventcollectorpkg/compressionpkg/storage/gcspkg/collector/logcollectorpkg/historyserverpkg/eventserver/typespkg/utilspkg/storage/s3pkg/storage/azureblobpkg/storage/aliyunoss/rayFiles that need test cases
Each item is independent.
pkg/utils/tasksummary.go— 0.0% [History Server][CI] add unit tests for the lineage task summary #5128pkg/eventserver/types/task.go— 0.0% @markwu7pkg/historyserver/timeline.go— 0.0% @AlterHoodiepkg/utils/filter.go— 0.0% @wuallen57730pkg/historyserver/cluster_status.go— 47.4% @jinbum-kimpkg/utils/utils.go— 61.9%pkg/eventserver/state_transition.go— 0.0%