Skip to content

Commit 44d5274

Browse files
dhaiducekopenshift-merge-robot
authored andcommitted
Use EventuallyWithOffset in test utils
This will signal to Ginkgo to return the calling line rather than the util function. Signed-off-by: Dale Haiducek <[email protected]>
1 parent 3bb46dc commit 44d5274

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/utils/utils.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func GetClusterLevelWithTimeout(
8787

8888
var obj *unstructured.Unstructured
8989

90-
Eventually(func() error {
90+
EventuallyWithOffset(1, func() error {
9191
var err error
9292
namespace := clientHubDynamic.Resource(gvr)
9393

@@ -129,7 +129,7 @@ func GetWithTimeout(
129129

130130
var obj *unstructured.Unstructured
131131

132-
Eventually(func() error {
132+
EventuallyWithOffset(1, func() error {
133133
var err error
134134
namespace := clientHubDynamic.Resource(gvr).Namespace(namespace)
135135

@@ -172,7 +172,7 @@ func ListWithTimeout(
172172

173173
var list *unstructured.UnstructuredList
174174

175-
Eventually(func() error {
175+
EventuallyWithOffset(1, func() error {
176176
var err error
177177
list, err = clientHubDynamic.Resource(gvr).List(context.TODO(), opts)
178178

@@ -211,7 +211,7 @@ func ListWithTimeoutByNamespace(
211211

212212
var list *unstructured.UnstructuredList
213213

214-
Eventually(func() error {
214+
EventuallyWithOffset(1, func() error {
215215
var err error
216216
list, err = clientHubDynamic.Resource(gvr).Namespace(ns).List(context.TODO(), opts)
217217

0 commit comments

Comments
 (0)