-
Notifications
You must be signed in to change notification settings - Fork 26
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
[close #229] Add integration test coverage report for TiKV-BR #230
Conversation
Signed-off-by: haojinming <[email protected]>
Signed-off-by: haojinming <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #230 +/- ##
================================================
+ Coverage 54.4026% 60.9804% +6.5777%
================================================
Files 236 238 +2
Lines 20181 20195 +14
================================================
+ Hits 10979 12315 +1336
+ Misses 8328 6758 -1570
- Partials 874 1122 +248
*This pull request uses carry forward flags. Click here to find out more.
|
br/tests/rawkv/main.go
Outdated
@@ -201,7 +206,11 @@ func (t *RawKVBRTester) InjectFailpoint(failpoint string) error { | |||
|
|||
func (t *RawKVBRTester) ExecBRCmd(ctx context.Context, cmdStr string) ([]byte, error) { | |||
log.Info("exec br cmd", zap.String("br", t.br), zap.String("args", cmdStr)) | |||
cmd := exec.CommandContext(ctx, t.br, strings.Split(cmdStr, " ")...) | |||
cmdParameter := []string{fmt.Sprintf("-test.coverprofile=%s_%s_%d", *coverageFile, t.name, t.runCnt)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just create a unique temporary file (see os.CreateTemp) for the coverage ? Then we don't need the case name & run count.
(If use temporary file, it may need to clear the coverage output path before running test)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks better. I have changed to temp file for coverage file. PTAL~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM~
Signed-off-by: haojinming <[email protected]>
Signed-off-by: haojinming <[email protected]>
Signed-off-by: haojinming <[email protected]>
Signed-off-by: haojinming <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM~
Signed-off-by: haojinming <[email protected]>
What problem does this PR solve?
Issue Number: close #229
Problem Description:
What is changed and how does it work?
Add integration test coverage report for TiKV-BR
Code changes
Check List for Tests
This PR has been tested by at least one of the following methods:
coverage files are generated as followings:
Side effects
Related changes