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

Add unit tests for methods in frontend API handler #6119

Closed timl3136 closed 3 weeks ago

timl3136 commented 3 weeks ago

What changed? Add unit tests for RespondDecisionTaskCompleted in frontend api handler

Why? Improve test coverage

How did you test it? Unit tests

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.17%. Comparing base (aad09de) to head (d85f496). Report is 1 commits behind head on master.

:exclamation: Current head d85f496 differs from pull request most recent head 4c0d1da

Please upload reports for the commit 4c0d1da to get more accurate results.

Additional details and impacted files [see 13 files with indirect coverage changes](https://app.codecov.io/gh/uber/cadence/pull/6119/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/6119?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/6119?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). Last update [aad09de...4c0d1da](https://app.codecov.io/gh/uber/cadence/pull/6119?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 018feab2-d9fc-47c6-b1ec-38eeb350d343

Details


Files with Coverage Reduction New Missed Lines %
service/history/queue/timer_queue_processor_base.go 1 77.66%
common/task/weighted_round_robin_task_scheduler.go 2 88.56%
service/frontend/api/handler.go 2 69.31%
service/history/task/transfer_active_task_executor.go 2 72.77%
common/task/fifo_task_scheduler.go 3 84.54%
common/persistence/statsComputer.go 3 98.21%
service/history/task/fetcher.go 3 86.6%
common/archiver/filestore/historyArchiver.go 4 80.95%
common/types/mapper/thrift/shared.go 4 98.31%
service/history/task/transfer_standby_task_executor.go 6 86.33%
<!-- Total: 545 -->
Totals Coverage Status
Change from base Build 018feaa3-8a65-4c9c-874c-0243b9141bed: -0.3%
Covered Lines: 105521
Relevant Lines: 148942

πŸ’› - Coveralls
coveralls commented 3 weeks ago

Pull Request Test Coverage Report for Build 018feecd-c54b-4228-8334-8ea702900f98

Details


Files with Coverage Reduction New Missed Lines %
common/persistence/sql/sqlplugin/postgres/task.go 2 73.4%
common/util.go 2 91.84%
service/history/task/transfer_standby_task_executor.go 3 86.33%
service/history/task/task.go 3 84.81%
common/task/fifo_task_scheduler.go 4 82.47%
service/history/execution/cache.go 6 74.61%
common/persistence/sql/sqlplugin/postgres/db.go 9 65.0%
service/history/task/task_util.go 20 70.57%
<!-- Total: 49 -->
Totals Coverage Status
Change from base Build 018fee53-2f0a-42d7-9d39-e20b5cb03809: -0.008%
Covered Lines: 106194
Relevant Lines: 148957

πŸ’› - Coveralls