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

storage: deflake TestStoreRangeMergeWatcher #31215

Merged
merged 1 commit into from
Oct 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions pkg/storage/client_merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2032,12 +2032,19 @@ func testMergeWatcher(t *testing.T, injectFailures bool) {
}
mtc.transferLease(ctx, rhsDesc.RangeID, 0, 2)

// Block Raft traffic to the LHS replica on store2, by holding its raftMu, so
// that its LHS isn't aware there's a merge in progress.
// After the LHS replica on store2 processes the split, block Raft traffic to
// it by holding its raftMu, so that it isn't aware there's a merge in
// progress.
lhsRepl2, err := store2.GetReplica(lhsDesc.RangeID)
if err != nil {
t.Fatal(err)
}
testutils.SucceedsSoon(t, func() error {
if !lhsRepl2.Desc().Equal(lhsDesc) {
return errors.New("store2 has not processed split")
}
return nil
})
lhsRepl2.RaftLock()

args := adminMergeArgs(lhsDesc.StartKey.AsRawKey())
Expand Down