Skip to content

Commit

Permalink
Merge pull request #2765 from davidfestal/fix-flake-2762
Browse files Browse the repository at this point in the history
馃悰 Fix TMC flake in the Upsyncer VW e2e test
  • Loading branch information
openshift-merge-robot committed Feb 8, 2023
2 parents 09cbd2f + acb6f3d commit 25f906c
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions test/e2e/virtual/syncer/virtualworkspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1956,13 +1956,24 @@ func TestUpsyncerVirtualWorkspace(t *testing.T) {
).Bind(t)

logWithTimestampf(t, "Waiting for the persistentvolumes crd to be imported and available in the upsyncer source cluster...")
require.Eventually(t, func() bool {
framework.Eventually(t, func() (bool, string) {
_, err := kubeClusterClient.CoreV1().PersistentVolumes().Cluster(upsyncerPath).List(ctx, metav1.ListOptions{})
if err != nil {
logWithTimestampf(t, "error seen waiting for persistentvolumes crd to become active: %v", err)
return false
return false, err.Error()
}
return true
return true, ""
}, wait.ForeverTestTimeout, time.Millisecond*100)

kubelikeUpsyncerVWClient, err := kcpkubernetesclientset.NewForConfig(upsyncer.UpsyncerVirtualWorkspaceConfig)
require.NoError(t, err)

logWithTimestampf(t, "Waiting for the persistentvolumes to be available in the upsyncer virtual workspace...")
framework.Eventually(t, func() (bool, string) {
_, err := kubelikeUpsyncerVWClient.CoreV1().PersistentVolumes().Cluster(upsyncerClusterName.Path()).List(ctx, metav1.ListOptions{})
if err != nil {
return false, err.Error()
}
return true, ""
}, wait.ForeverTestTimeout, time.Millisecond*100)

syncTargetKey := upsyncer.ToSyncTargetKey()
Expand Down

0 comments on commit 25f906c

Please sign in to comment.