Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
121279: rpc: expect eventual connection in remote offset unhealthy test r=arulajmani a=kvoli

`TestRemoteOffsetUnhealthy` manually connects a grid of peers to later assert on the remote offset between rpc connections. The initial connection setup can timeout under resource constraints.

Retry the initial connection when setting up the test.

Fixes: cockroachdb#121238
Fixes: cockroachdb#116898
Release note: None

Co-authored-by: Austen McClernon <[email protected]>
  • Loading branch information
craig[bot] and kvoli committed Mar 28, 2024
2 parents 00d91d5 + 2fe2f25 commit fbae232
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pkg/rpc/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1163,9 +1163,16 @@ func TestRemoteOffsetUnhealthy(t *testing.T) {
if i == j {
continue
}
if _, err := clientNodeContext.ctx.GRPCDialNode(serverNodeContext.ctx.AdvertiseAddr, serverNodeContext.ctx.NodeID.Get(), DefaultClass).Connect(ctx); err != nil {
t.Fatal(err)
}
testutils.SucceedsSoon(t, func() error {
if _, err := clientNodeContext.ctx.GRPCDialNode(
serverNodeContext.ctx.AdvertiseAddr,
serverNodeContext.ctx.NodeID.Get(),
DefaultClass,
).Connect(ctx); err != nil {
return err
}
return nil
})
}
}

Expand Down

0 comments on commit fbae232

Please sign in to comment.