Skip to content

Commit

Permalink
Reduced inspection intervals
Browse files Browse the repository at this point in the history
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
  • Loading branch information
LiZhenCheng9527 committed Feb 4, 2024
1 parent a5daf37 commit 88c444d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions e2e/resources/attachedcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ func RemoveAttachedCluster(client kurator.Interface, namespace, name string) err
return nil
}

// WaitAttachedClusterFitWith wait AttachedCluster sync with fit func.
// WaitAttachedClusterFitWith wait attachedCluster sync with fit func.
func WaitAttachedClusterFitWith(client kurator.Interface, namespace, name string, fit func(attachedCluster *clusterv1a1.AttachedCluster) bool) {
gomega.Eventually(func() bool {
attachedClusterPresentOnCluster, err := client.ClusterV1alpha1().AttachedClusters(namespace).Get(context.TODO(), name, metav1.GetOptions{})
if err != nil {
return false
}
return fit(attachedClusterPresentOnCluster)
}, pollTimeout, pollInterval).Should(gomega.Equal(true))
}, pollTimeout, pollIntervalInHostCluster).Should(gomega.Equal(true))
}
4 changes: 2 additions & 2 deletions e2e/resources/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package resources
import "time"

const (
// pollInterval defines the interval time for a poll operation.
pollInterval = 5 * time.Second
// pollIntervalInHostCluster defines the interval time for a poll operation.
pollIntervalInHostCluster = 3 * time.Second
// pollTimeout defines the time after which the poll operation times out.
pollTimeout = 420 * time.Second
)

0 comments on commit 88c444d

Please sign in to comment.