Skip to content

Commit

Permalink
Wait for nodes to be availble in disconnection tests (#33298)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex McGrath authored Oct 12, 2023
1 parent ca14607 commit dcb2f13
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2251,6 +2251,19 @@ func runDisconnectTest(t *testing.T, suite *integrationTestSuite, tc disconnectT
tc.concurrentConns = 1
}

require.EventuallyWithT(t, func(t *assert.CollectT) {
// once the tunnel is established we need to wait until we have a
// connection to the remote auth
site := teleport.GetSiteAPI(helpers.Site)
if !assert.NotNil(t, site) {
return
}
// we need to wait until we know about the node because direct dial to
// unregistered servers is no longer supported
_, err := site.GetNode(ctx, defaults.Namespace, teleport.Config.HostUUID)
assert.NoError(t, err)
}, time.Second*30, 250*time.Millisecond)

asyncErrors := make(chan error, 1)

for i := 0; i < tc.concurrentConns; i++ {
Expand Down

0 comments on commit dcb2f13

Please sign in to comment.