Skip to content

util/checksum: fix unstable test#28332

Merged
ti-chi-bot merged 2 commits intopingcap:masterfrom
Ranxy:checksum-unstable-test
Sep 25, 2021
Merged

util/checksum: fix unstable test#28332
ti-chi-bot merged 2 commits intopingcap:masterfrom
Ranxy:checksum-unstable-test

Conversation

@Ranxy
Copy link
Contributor

@Ranxy Ranxy commented Sep 25, 2021

What problem does this PR solve?

Issue Number: close #28299

Problem Summary:

[2021-09-23T16:00:22.934Z] --- FAIL: TestModifyOneByte (0.00s)
[2021-09-23T16:00:22.934Z]     --- FAIL: TestModifyOneByte/encrypted (0.00s)
[2021-09-23T16:00:22.934Z]         checksum_test.go:179: 
[2021-09-23T16:00:22.934Z]             	Error Trace:	checksum_test.go:179
[2021-09-23T16:00:22.934Z]             	            				checksum_test.go:150
[2021-09-23T16:00:22.934Z]             	Error:      	Target error should be in err chain:
[2021-09-23T16:00:22.934Z]             	            	expected: "error checksum"
[2021-09-23T16:00:22.934Z]             	            	in chain: 
[2021-09-23T16:00:22.934Z]             	Test:       	TestModifyOneByte/encrypted

What is changed and how it works?

The instability is caused by the fact that the encrypted characters are exactly equal to the modified characters, thus causing the problem.
The solution is not to use predefined characters for substitution, but to use the current value minus one to ensure the difference.

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 25, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • mmyj
  • tisonkun

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Details

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 25, 2021
@Ranxy
Copy link
Contributor Author

Ranxy commented Sep 25, 2021

/cc @tisonkun @mmyj @wshwsh12

Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

LGTM.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 25, 2021
Copy link
Member

@mmyj mmyj left a comment

Choose a reason for hiding this comment

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

lgtm

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 25, 2021
@mmyj
Copy link
Member

mmyj commented Sep 25, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: beb762b

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 25, 2021
@ti-chi-bot ti-chi-bot merged commit 955274f into pingcap:master Sep 25, 2021
@Ranxy Ranxy deleted the checksum-unstable-test branch September 26, 2021 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unstable test TestModifyOneByte/encrypted

4 participants