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.97k stars 773 forks source link

Add tests for dlq_handler.go #6071

Closed fimanishi closed 4 weeks ago

fimanishi commented 1 month ago

What changed? tests for dlq_handler.go. Moved getInterval function to dlqHandleImpl to allow testing

Why? improve unit test coverage

How did you test it? unit tests

Potential risks getInterval behavior change due to change of location definition

Release notes

Documentation Changes

codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 68.36%. Comparing base (919f416) to head (f04d44a). Report is 36 commits behind head on master.

Additional details and impacted files | [Files](https://app.codecov.io/gh/uber/cadence/pull/6071?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/replication/dlq\_handler.go](https://app.codecov.io/gh/uber/cadence/pull/6071?src=pr&el=tree&filepath=service%2Fhistory%2Freplication%2Fdlq_handler.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber#diff-c2VydmljZS9oaXN0b3J5L3JlcGxpY2F0aW9uL2RscV9oYW5kbGVyLmdv) | `100.00% <100.00%> (+44.51%)` | :arrow_up: | ... and [49 files with indirect coverage changes](https://app.codecov.io/gh/uber/cadence/pull/6071/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/6071?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/6071?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). Last update [919f416...f04d44a](https://app.codecov.io/gh/uber/cadence/pull/6071?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 1 month ago

Pull Request Test Coverage Report for Build 018fdeff-1562-4c21-8049-dfdd6139a4ee

Details


Files with Coverage Reduction New Missed Lines %
service/history/queue/timer_queue_processor_base.go 1 78.28%
common/task/weighted_round_robin_task_scheduler.go 2 89.05%
common/dynamicconfig/constants.go 2 99.05%
common/persistence/taskManager.go 2 74.49%
common/persistence/visibility_single_manager.go 2 99.33%
common/persistence/nosql/utils.go 2 60.0%
service/history/task/task.go 3 84.81%
service/matching/poller/history.go 3 74.0%
common/persistence/wrappers/errorinjectors/utils.go 3 93.7%
service/matching/tasklist/task_gc.go 3 92.11%
<!-- Total: 2049 -->
Totals Coverage Status
Change from base Build 018fdeeb-1615-4507-ae03-236a4f5abcab: -0.3%
Covered Lines: 102228
Relevant Lines: 147337

💛 - Coveralls