uber / cadence

Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.
https://cadenceworkflow.io
MIT License
7.96k stars 772 forks source link

Unit tests for part of applyEvents #6120

Closed bowenxia closed 2 weeks ago

bowenxia commented 3 weeks ago

What changed? Added unit tests for part of applyEvents (one branch) Lots of duplicated code like passing functions with a lot of parameters

Why? code coverage week

How did you test it? unit test

Potential risks

Release notes

Documentation Changes

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.48%. Comparing base (b38bd0c) to head (8b61c41). Report is 28 commits behind head on master.

Additional details and impacted files | [Files](https://app.codecov.io/gh/uber/cadence/pull/6120?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber) | Coverage Δ | | |---|---|---| | [service/history/ndc/replication\_task.go](https://app.codecov.io/gh/uber/cadence/pull/6120?src=pr&el=tree&filepath=service%2Fhistory%2Fndc%2Freplication_task.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber#diff-c2VydmljZS9oaXN0b3J5L25kYy9yZXBsaWNhdGlvbl90YXNrLmdv) | `53.64% <ø> (ø)` | | ... and [27 files with indirect coverage changes](https://app.codecov.io/gh/uber/cadence/pull/6120/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/uber/cadence/pull/6120?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/uber/cadence/pull/6120?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). Last update [b38bd0c...8b61c41](https://app.codecov.io/gh/uber/cadence/pull/6120?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber).
coveralls commented 3 weeks ago

Pull Request Test Coverage Report for Build 018feb17-baf5-4367-9b93-9f3d0ede743d

Details


Files with Coverage Reduction New Missed Lines %
common/types/shared.go 1 39.88%
service/history/task/transfer_standby_task_executor.go 2 86.33%
service/history/execution/mutable_state_util.go 2 78.52%
common/persistence/historyManager.go 2 66.67%
service/history/task/task.go 3 84.81%
common/task/fifo_task_scheduler.go 3 84.54%
service/history/task/timer_active_task_executor.go 3 79.33%
bench/lib/client.go 4 0.0%
common/types/mapper/thrift/shared.go 4 98.31%
service/matching/config/config.go 4 91.49%
<!-- Total: 920 -->
Totals Coverage Status
Change from base Build 018fead2-aa16-413b-ab6a-987f535deb2d: -0.5%
Covered Lines: 105247
Relevant Lines: 148952

💛 - Coveralls
coveralls commented 3 weeks ago

Pull Request Test Coverage Report for Build 018fec25-ac6f-4bea-9e17-8c7e82d85998

Details


Files with Coverage Reduction New Missed Lines %
common/types/shared.go 1 39.88%
service/history/task/transfer_standby_task_executor.go 2 87.14%
common/task/weighted_round_robin_task_scheduler.go 2 89.05%
service/history/shard/context.go 2 78.36%
common/task/fifo_task_scheduler.go 2 85.57%
common/quotas/global/collection/internal/atomicmap.go 2 93.94%
common/membership/hashring.go 2 84.69%
service/history/task/task.go 3 84.81%
service/history/task/transfer_active_task_executor.go 3 72.9%
service/history/task/timer_active_task_executor.go 3 79.33%
<!-- Total: 926 -->
Totals Coverage Status
Change from base Build 018fead2-aa16-413b-ab6a-987f535deb2d: -0.5%
Covered Lines: 105251
Relevant Lines: 148952

💛 - Coveralls
coveralls commented 3 weeks ago

Pull Request Test Coverage Report for Build 018ff470-1f1b-404b-8cdf-366a2b142a6f

Details


Files with Coverage Reduction New Missed Lines %
common/types/shared.go 1 39.88%
service/history/task/transfer_standby_task_executor.go 2 86.94%
common/task/parallel_task_processor.go 2 93.06%
service/history/task/transfer_active_task_executor.go 2 72.97%
service/history/execution/mutable_state_util.go 2 78.52%
common/membership/hashring.go 2 84.69%
service/matching/tasklist/task_reader.go 2 75.33%
common/persistence/historyManager.go 2 66.67%
service/history/task/timer_active_task_executor.go 3 79.33%
service/history/task/fetcher.go 3 86.6%
<!-- Total: 898 -->
Totals Coverage Status
Change from base Build 018fead2-aa16-413b-ab6a-987f535deb2d: -0.5%
Covered Lines: 105285
Relevant Lines: 148952

💛 - Coveralls
coveralls commented 3 weeks ago

Pull Request Test Coverage Report for Build 018ff49b-921e-488a-9e18-9f6c77d485e7

Details


Files with Coverage Reduction New Missed Lines %
common/types/shared.go 1 39.88%
common/peerprovider/ringpopprovider/config.go 2 81.58%
common/persistence/historyManager.go 2 66.67%
service/history/handler/handler.go 3 96.2%
service/history/task/timer_active_task_executor.go 3 79.33%
bench/lib/client.go 4 0.0%
common/types/mapper/thrift/shared.go 4 98.31%
service/matching/config/config.go 4 91.49%
common/task/fifo_task_scheduler.go 5 84.54%
service/history/task/transfer_active_task_executor.go 5 72.77%
<!-- Total: 897 -->
Totals Coverage Status
Change from base Build 018fead2-aa16-413b-ab6a-987f535deb2d: -0.5%
Covered Lines: 105284
Relevant Lines: 148952

💛 - Coveralls