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

Improve test coverage for sql_execution_store #5677

Merged
merged 2 commits into from
Feb 23, 2024
Merged

Conversation

Shaddoll
Copy link
Contributor

What changed?
Add unit tests for DeleteWorkflow and PutReplicationTaskToDLQ function

Why?
improve test coverage

How did you test it?
unit tests

Potential risks

Release notes

Documentation Changes

@coveralls
Copy link

coveralls commented Feb 21, 2024

Pull Request Test Coverage Report for Build 018dd350-153d-4645-88ea-177e4481c7b9

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 113 unchanged lines in 18 files lost coverage.
  • Overall coverage decreased (-0.03%) to 62.844%

Files with Coverage Reduction New Missed Lines %
common/persistence/sql/common.go 2 72.73%
common/persistence/sql/sqlplugin/mysql/db.go 2 83.33%
common/persistence/sql/sqlplugin/mysql/task.go 2 73.68%
common/persistence/sql/sqlplugin/postgres/db.go 2 85.0%
common/persistence/sql/sqlplugin/postgres/task.go 2 73.4%
common/task/weighted_round_robin_task_scheduler.go 2 88.06%
common/util.go 2 91.69%
service/history/execution/mutable_state_builder.go 2 68.64%
service/matching/db.go 2 73.23%
service/matching/taskListManager.go 2 80.96%
Totals Coverage Status
Change from base Build 018dd33b-b7c4-4656-8f90-260a07e8a617: -0.03%
Covered Lines: 92891
Relevant Lines: 147813

💛 - Coveralls

Comment on lines +1766 to +1768
mockDB.EXPECT().InsertIntoReplicationTasksDLQ(gomock.Any(), gomock.Any()).Return(nil, err)
mockDB.EXPECT().IsDupEntryError(err).Return(false)
mockDB.EXPECT().IsNotFoundError(err).Return(true)
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 to use Times(n) if it's predictable. just provides more strict validation.

@Shaddoll Shaddoll merged commit 34ae2fc into uber:master Feb 23, 2024
17 checks passed
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