Skip to content

Commit

Permalink
Merge pull request #81271 from cockroachdb/blathers/backport-release-…
Browse files Browse the repository at this point in the history
…22.1-81236
  • Loading branch information
erikgrinaker authored May 17, 2022
2 parents ca5db50 + 0e6d3eb commit d451c58
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions pkg/kv/kvserver/client_raft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4253,15 +4253,13 @@ func TestInitRaftGroupOnRequest(t *testing.T) {
log.Errorf(ctx, "expected raft group to be uninitialized")
}
// Send an increment and verify that initializes the Raft group.
_, pErr := kv.SendWrapped(ctx,
followerStore.TestSender(), incrementArgs(splitKey, 1))
if pErr != nil {
t.Fatal(pErr)
}
//
// NB: We don't know who has the lease, so we ignore any errors (i.e.
// NotLeaseHolderError). We only care that it initializes the Raft group.
_, pErr := kv.SendWrapped(ctx, followerStore.TestSender(), incrementArgs(splitKey, 1))
_ = pErr // appease returncheck linter

if !repl.IsRaftGroupInitialized() {
t.Fatal("expected raft group to be initialized")
}
require.True(t, repl.IsRaftGroupInitialized(), "expected raft group to be initialized")
}

// TestFailedConfChange verifies correct behavior after a configuration change
Expand Down

0 comments on commit d451c58

Please sign in to comment.