Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new tests to config_Store_client_test.go #5983

Merged
merged 13 commits into from
May 8, 2024

Conversation

agautam478
Copy link
Contributor

What changed?

  • Notced the coverage was 60%. Added new tests to push it to 73%

Why?
coverage

How did you test it?
unit tests

Potential risks

Release notes

Documentation Changes

Copy link

codecov bot commented May 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.49%. Comparing base (a843a9e) to head (8ae847c).
Report is 12 commits behind head on master.

❗ Current head 8ae847c differs from pull request most recent head 4162819. Consider uploading reports for the commit 4162819 to get more accurate results

Additional details and impacted files

see 44 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a843a9e...4162819. Read the comment docs.

taylanisikdemir and others added 12 commits May 8, 2024 08:52
…flow#5980)

* TestRespondActivityTaskFailed_Success implementation

* Alternate test for TerstRespondActivityTaskFailed

* code lint
…-workflow#5981)

This ensures they get included in the code coverage metrics.
…flow#5986)

This test had three issues:
1. it's *very* time-sensitive, spending >=200ms across all StartWorkflowExecution calls will allow one (or more) of the "should be limited" calls to succeed.  This is now more permissive.
2. it seems to misunderstand / be misleading about how ratelimits work.  The reason the first 5 calls can be done "immediately" is due to the burst value, not the RPS itself.  We just init the burst with that value.
3. if `assert.ErrorAs` failed, the next line would panic because the error value was nil.  `require` would work too, but switching to `if assert.ErrorAs(...) {...}` lets the rest of the checks continue, and it's relatively simple.

These are now fixed.
…rkflow#5967)

Thankfully this all appears to be test-related and not any real risks,
but I realized while writing some other code that `go test` doesn't check this.

I'm really not sure what scenarios it might be wrong in, but it catches loads
of incorrect concurrent code in my experience.  So now it's required.
@agautam478 agautam478 merged commit b4bbae4 into cadence-workflow:master May 8, 2024
18 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 018f58e8-384b-4dd1-b10b-4bbdf2249465

Details

  • 2071 of 2978 (69.54%) changed or added relevant lines in 33 files are covered.
  • 70 unchanged lines in 17 files lost coverage.
  • Overall coverage increased (+0.08%) to 68.492%

Changes Missing Coverage Covered Lines Changed/Added Lines %
service/history/engine/engineimpl/remove_signal_mutable_state.go 19 21 90.48%
service/history/engine/engineimpl/reset_sticky_tasklist.go 12 18 66.67%
common/persistence/persistence-tests/historyV2PersistenceTest.go 0 7 0.0%
service/history/engine/engineimpl/cross_cluster_operations.go 0 10 0.0%
service/history/engine/engineimpl/record_child_execution_completed.go 62 73 84.93%
service/history/engine/engineimpl/reset_queues.go 0 12 0.0%
service/history/engine/engineimpl/respond_activity_task_completed.go 63 78 80.77%
service/history/engine/engineimpl/terminate_workflow_execution.go 44 60 73.33%
service/history/engine/engineimpl/signal_workflow_execution.go 64 81 79.01%
service/history/engine/engineimpl/respond_activity_task_canceled.go 55 74 74.32%
Files with Coverage Reduction New Missed Lines %
common/task/weighted_round_robin_task_scheduler.go 1 89.05%
common/persistence/sql/sqlplugin/postgres/task.go 2 73.4%
common/task/parallel_task_processor.go 2 93.06%
service/matching/db.go 2 73.23%
service/history/task/transfer_active_task_executor.go 2 72.9%
common/util.go 2 91.78%
service/matching/taskListManager.go 2 81.16%
common/membership/hashring.go 2 84.69%
common/log/tag/tags.go 3 50.46%
service/history/task/timer_standby_task_executor.go 3 85.63%
Totals Coverage Status
Change from base Build 018f54e5-7508-40f1-ae99-a0884c40b0fa: 0.08%
Covered Lines: 100602
Relevant Lines: 146881

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants