Skip to content

Commit ef95d68

Browse files
committed
kvcoord: deflake TestGetFirstRangeDescriptor
Make sure the gossip network is established before running the gossip simulation loop. Epic: none Release note: none
1 parent 79e136a commit ef95d68

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/kv/kvclient/kvcoord/dist_sender_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,6 +2072,11 @@ func TestGetFirstRangeDescriptor(t *testing.T) {
20722072
node.Gossip.EnableSimulationCycler(false)
20732073
}
20742074
n.Start()
2075+
// Make sure the first two nodes are connected via gossip.
2076+
n.SimulateNetwork(func(_ int, _ *simulation.Network) bool { return false })
2077+
<-n.Nodes[0].Gossip.Connected
2078+
<-n.Nodes[1].Gossip.Connected
2079+
20752080
ds := NewDistSender(DistSenderConfig{
20762081
AmbientCtx: log.MakeTestingAmbientContext(stopper.Tracer()),
20772082
NodeDescs: n.Nodes[0].Gossip,

0 commit comments

Comments
 (0)