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

Unit test to cover 88.7% for history replicator #6314

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

bowenxia
Copy link
Contributor

What changed?
Add more test for history replicator

Why?
for more test coverage

How did you test it?
unit test

Potential risks

Release notes

Documentation Changes

@bowenxia bowenxia changed the title Unit test covered 88.7% for history replicator Unit test to cover 88.7% for history replicator Sep 28, 2024
mockStateBuilder := execution.NewMockStateBuilder(ctrl)
mockTransactionManager := NewMocktransactionManager(ctrl)
mockShard := shard.NewMockContext(ctrl)
logger := log.NewNoop()
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I prefer testlogger.New(t) which can give you logs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are too many test cases. Switching to testLogger might cause the tests too messy :(

Copy link

codecov bot commented Sep 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.52%. Comparing base (7e2c9dd) to head (a6896cd).
Report is 3 commits behind head on master.

Additional details and impacted files

see 8 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 7e2c9dd...a6896cd. Read the comment docs.

@bowenxia bowenxia merged commit 37b3c88 into master Oct 1, 2024
21 checks passed
@bowenxia bowenxia deleted the xbowen/history_replicator_unit_test_02 branch October 1, 2024 10:33
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