From c466c49682f6f7cc87d1c5c5e3e435551d1bb15d Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 25 Oct 2022 13:28:09 +0200 Subject: [PATCH] e2e apps: avoid assertions in wait.Until callback wait.Until catches panics and logs them, which leads to confusing output. Besides, the test is written so that failures must get reported to the main goroutine. --- test/e2e/apps/deployment.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/e2e/apps/deployment.go b/test/e2e/apps/deployment.go index 3225375430b..f17ca09bf66 100644 --- a/test/e2e/apps/deployment.go +++ b/test/e2e/apps/deployment.go @@ -1410,7 +1410,11 @@ func testRollingUpdateDeploymentWithLocalTrafficLoadBalancer(f *framework.Framew // should remain unchanged. wait.Until(func() { actualNodes, err := jig.GetEndpointNodeNames() - framework.ExpectNoError(err) + if err != nil { + framework.Logf("The previous set of nodes with local endpoints was %v, now the lookup failed: %v", expectedNodes.List(), err) + failed <- struct{}{} + return + } if !actualNodes.Equal(expectedNodes) { framework.Logf("The set of nodes with local endpoints changed; started with %v, now have %v", expectedNodes.List(), actualNodes.List()) failed <- struct{}{}