Skip to content

Commit 2d1f8fa

Browse files
committed
Update snippets filter functional test
1 parent 2284456 commit 2d1f8fa

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/suite/snippets_filter_test.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,11 @@ var _ = Describe("SnippetsFilter", Ordered, Label("functional", "snippets-filter
228228
Expect(resourceManager.ApplyFromFiles(files, namespace)).To(Succeed())
229229

230230
nsname := types.NamespacedName{Name: "tea", Namespace: namespace}
231-
Expect(waitForHTTPRouteToHaveGatewayNotProgrammedCond(nsname)).To(Succeed())
231+
Eventually(waitForHTTPRouteToHaveGatewayNotProgrammedCond).
232+
WithArguments(nsname).
233+
WithTimeout(timeoutConfig.GetStatusTimeout).
234+
WithPolling(500 * time.Millisecond).
235+
Should(Succeed())
232236

233237
Expect(resourceManager.DeleteFromFiles(files, namespace)).To(Succeed())
234238
})
@@ -239,7 +243,11 @@ var _ = Describe("SnippetsFilter", Ordered, Label("functional", "snippets-filter
239243
Expect(resourceManager.ApplyFromFiles(files, namespace)).To(Succeed())
240244

241245
nsname := types.NamespacedName{Name: "soda", Namespace: namespace}
242-
Expect(waitForHTTPRouteToHaveGatewayNotProgrammedCond(nsname)).To(Succeed())
246+
Eventually(waitForHTTPRouteToHaveGatewayNotProgrammedCond).
247+
WithArguments(nsname).
248+
WithTimeout(timeoutConfig.GetStatusTimeout).
249+
WithPolling(500 * time.Millisecond).
250+
Should(Succeed())
243251

244252
Expect(resourceManager.DeleteFromFiles(files, namespace)).To(Succeed())
245253
})
@@ -260,7 +268,6 @@ func waitForHTTPRouteToHaveGatewayNotProgrammedCond(httpRouteNsName types.Namesp
260268
500*time.Millisecond,
261269
true, /* poll immediately */
262270
func(ctx context.Context) (bool, error) {
263-
fmt.Println("we are polling ")
264271
var hr v1.HTTPRoute
265272
var err error
266273

@@ -312,7 +319,6 @@ func waitForSnippetsFilterToBeAccepted(snippetsFilterNsNames types.NamespacedNam
312319
500*time.Millisecond,
313320
true, /* poll immediately */
314321
func(ctx context.Context) (bool, error) {
315-
fmt.Println("we are polling ")
316322
var sf ngfAPI.SnippetsFilter
317323
var err error
318324

0 commit comments

Comments
 (0)