Skip to content

Commit 40ac29d

Browse files
authored
Attempt to make LeafSessionRecording less flaky (#52776)
This applies the same measures as #49850 to ensure that nodes are present and dialable before proceeding with the test. Fixes #52775.
1 parent e41c6a3 commit 40ac29d

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

integration/integration_test.go

+10-3
Original file line numberDiff line numberDiff line change
@@ -7524,9 +7524,8 @@ type serviceCfgOpt func(cfg *servicecfg.Config, isRoot bool)
75247524
func createTrustedClusterPair(t *testing.T, suite *integrationTestSuite, extraServices func(*testing.T, *helpers.TeleInstance, *helpers.TeleInstance), cfgOpts ...serviceCfgOpt) (*client.TeleportClient, *helpers.TeleInstance, *helpers.TeleInstance) {
75257525
ctx := context.Background()
75267526
username := suite.Me.Username
7527-
name := "test"
7528-
rootName := fmt.Sprintf("root-%s", name)
7529-
leafName := fmt.Sprintf("leaf-%s", name)
7527+
rootName := "root-test"
7528+
leafName := "leaf-test"
75307529

75317530
// Create root and leaf clusters.
75327531
rootCfg := helpers.InstanceConfig{
@@ -7651,6 +7650,14 @@ func createTrustedClusterPair(t *testing.T, suite *integrationTestSuite, extraSe
76517650
require.NoError(t, tc.AddTrustedCA(context.Background(), leafCA))
76527651
}
76537652

7653+
// Wait for the nodes to be visible to both Proxy instances.
7654+
if root.Config.SSH.Enabled {
7655+
require.NoError(t, root.WaitForNodeCount(ctx, rootName, 2))
7656+
}
7657+
if leaf.Config.SSH.Enabled {
7658+
instance := helpers.TeleInstance{Tunnel: leaf.Tunnel}
7659+
require.NoError(t, instance.WaitForNodeCount(ctx, leafName, 2))
7660+
}
76547661
return tc, root, leaf
76557662
}
76567663

0 commit comments

Comments
 (0)