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

test:stablize test case prewrite secondaries #18751

Merged
merged 4 commits into from
Jul 24, 2020

Conversation

cfzjywxk
Copy link
Contributor

What problem does this PR solve?

Problem Summary:

The case may fail like

[2020-07-23T11:37:45.570Z] ----------------------------------------------------------------------
[2020-07-23T11:37:45.570Z] FAIL: 2pc_test.go:1140: testCommitterSuite.TestPrewiteSecondaryKeys
[2020-07-23T11:37:45.570Z] 
[2020-07-23T11:37:45.570Z] 2pc_test.go:1174:
[2020-07-23T11:37:45.570Z]     c.Assert(mock.seenPrimaryReq > 0 && mock.seenSecondaryReq > 0, IsTrue)
[2020-07-23T11:37:45.570Z] ... obtained bool = false
[2020-07-23T11:37:45.570Z] 
[2020-07-23T11:37:45.570Z] 
[2020-07-23T11:37:45.570Z] ----------------------------------------------------------------------

This is because the minCommitTS returned from mocktikv is always zero, the prewrite may fallback to the normal path, if the primary key is in the fallback prewrite requests, the seen check will fail.

What is changed and how it works?

What's Changed:
Add flag in testingknots to disable fallback in test cases.

How it Works:

Related changes

Check List

Tests

  • Unit test

Side effects

Release note

@coocood
Copy link
Member

coocood commented Jul 24, 2020

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 24, 2020
@codecov
Copy link

codecov bot commented Jul 24, 2020

Codecov Report

Merging #18751 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #18751   +/-   ##
===========================================
  Coverage   79.7677%   79.7677%           
===========================================
  Files           544        544           
  Lines        149736     149736           
===========================================
  Hits         119441     119441           
  Misses        20950      20950           
  Partials       9345       9345           

Copy link
Member

@jackysp jackysp 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-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Jul 24, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Jul 24, 2020
@jackysp
Copy link
Member

jackysp commented Jul 24, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 24, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@cfzjywxk merge failed.

@cfzjywxk
Copy link
Contributor Author

/merge

@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 18759

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@cfzjywxk merge failed.

@cfzjywxk
Copy link
Contributor Author

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@cfzjywxk merge failed.

@cfzjywxk
Copy link
Contributor Author

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit bd733c3 into pingcap:master Jul 24, 2020
@cfzjywxk cfzjywxk deleted the stablize_prewrite_secondaries branch July 24, 2020 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test 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.

4 participants