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

Add tests for transfer_queue_processor.go #6483

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

fimanishi
Copy link
Contributor

What changed?
Added tests for transfer_queue_processor.go

Why?
Code coverage

How did you test it?
Unit tests

Potential risks

Release notes

Documentation Changes

@@ -39,40 +57,926 @@ import (
"github.com/uber/cadence/service/worker/archiver"
)

func TestTransferQueueProcessor_RequireStartStop(t *testing.T) {
type (
transferQueueProcessorSuite struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid introducing new suites. As far as I understand, we generally agree that suites are not very useful, and you can achieve the same with one function that will prepare the object and mocks.

goleak.VerifyNone could be switched to VerifyTestMain and put into TestMain of the package.

Copy link
Contributor

@3vilhamster 3vilhamster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not introduce new suites in tests.
It should be fine for existing suites, but all new parts should be tested as individual tests with a table-test structure where suitable.

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.07%. Comparing base (c7b20d4) to head (b7a8569).
Report is 27 commits behind head on master.

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 c7b20d4...b7a8569. Read the comment docs.

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.

3 participants