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.
This commit is contained in:
Patrick Ohly 2022-10-25 13:28:09 +02:00
parent 2168dd5334
commit c466c49682

View File

@ -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{}{}