Skip to content

Commit 6ced23a

Browse files
authored
Merge pull request kubernetes#98405 from aojea/e2elbudp
Fix loadbalancer e2e udp: Part 2
2 parents bfac3e9 + a38b7e5 commit 6ced23a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/e2e/network/loadbalancer.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,10 @@ var _ = SIGDescribe("LoadBalancers", func() {
422422
s.Spec.Ports[0].Port++
423423
})
424424
framework.ExpectNoError(err)
425-
if int(udpService.Spec.Ports[0].Port) == svcPort {
426-
framework.Failf("UDP Spec.Ports[0].Port (%d) did not change", udpService.Spec.Ports[0].Port)
425+
svcPortOld := svcPort
426+
svcPort = int(udpService.Spec.Ports[0].Port)
427+
if svcPort == svcPortOld {
428+
framework.Failf("UDP Spec.Ports[0].Port (%d) did not change", svcPort)
427429
}
428430
if int(udpService.Spec.Ports[0].NodePort) != udpNodePort {
429431
framework.Failf("UDP Spec.Ports[0].NodePort (%d) changed", udpService.Spec.Ports[0].NodePort)

0 commit comments

Comments
 (0)