Skip to content

Commit 110ab37

Browse files
authored
fix(e2e): fix the flaky test in the gateway scenario (#12633)
## Motivation Trying to fix the flaky test here: https://github.com/kumahq/kuma/actions/runs/12880363478/job/35911983525#step:12:11928 ## Implementation information Wait for readiness of the `test-server-mlbs` app before using it. > Changelog: skip --------- Signed-off-by: Jay Chen <[email protected]>
1 parent e8884d7 commit 110ab37

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/e2e_env/kubernetes/gateway/gateway.go

+9-1
Original file line numberDiff line numberDiff line change
@@ -558,17 +558,25 @@ spec:
558558
routes := httpRoute("test-server-mlbs", "/mlbs", "test-server-mlbs_simple-gateway_svc_80")
559559

560560
BeforeAll(func() {
561+
testServerApp := "test-server-mlbs"
561562
err := NewClusterSetup().
562563
Install(testserver.Install(
563564
testserver.WithMesh(meshName),
564565
testserver.WithNamespace(namespace),
565-
testserver.WithName("test-server-mlbs"),
566+
testserver.WithName(testServerApp),
566567
testserver.WithStatefulSet(true),
567568
testserver.WithReplicas(3),
568569
)).
569570
Install(YamlK8s(routes...)).
570571
Setup(kubernetes.Cluster)
571572
Expect(err).ToNot(HaveOccurred())
573+
574+
for _, fn := range []InstallFunc{
575+
WaitNumPods(namespace, 3, testServerApp),
576+
WaitPodsAvailable(namespace, testServerApp),
577+
} {
578+
Expect(fn(kubernetes.Cluster)).To(Succeed())
579+
}
572580
})
573581

574582
AfterAll(func() {

0 commit comments

Comments
 (0)