mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 18:02:01 +00:00
e2e apps: capture expected state before making changes
Looking up the expected nodes in the goroutine raced with the test making changes to the configuration. When doing (unrelated?) changes, the test started to fail: Oct 23 15:47:03.092: INFO: Unexpected error: <*errors.errorString | 0xc001154c70>: { s: "no subset of available IP address found for the endpoint test-rolling-update-with-lb within timeout 2m0s", } Oct 23 15:47:03.092: FAIL: no subset of available IP address found for the endpoint test-rolling-update-with-lb within timeout 2m0s
This commit is contained in:
parent
7454c3ff81
commit
2168dd5334
@ -1395,14 +1395,15 @@ func testRollingUpdateDeploymentWithLocalTrafficLoadBalancer(f *framework.Framew
|
|||||||
}
|
}
|
||||||
e2eservice.TestReachableHTTP(lbNameOrAddress, svcPort, timeout)
|
e2eservice.TestReachableHTTP(lbNameOrAddress, svcPort, timeout)
|
||||||
|
|
||||||
|
expectedNodes, err := jig.GetEndpointNodeNames()
|
||||||
|
framework.ExpectNoError(err)
|
||||||
|
|
||||||
framework.Logf("Starting a goroutine to watch the service's endpoints in the background")
|
framework.Logf("Starting a goroutine to watch the service's endpoints in the background")
|
||||||
done := make(chan struct{})
|
done := make(chan struct{})
|
||||||
failed := make(chan struct{})
|
failed := make(chan struct{})
|
||||||
defer close(done)
|
defer close(done)
|
||||||
go func() {
|
go func() {
|
||||||
defer ginkgo.GinkgoRecover()
|
defer ginkgo.GinkgoRecover()
|
||||||
expectedNodes, err := jig.GetEndpointNodeNames()
|
|
||||||
framework.ExpectNoError(err)
|
|
||||||
// The affinity policy should ensure that before an old pod is
|
// The affinity policy should ensure that before an old pod is
|
||||||
// deleted, a new pod will have been created on the same node.
|
// deleted, a new pod will have been created on the same node.
|
||||||
// Thus the set of nodes with local endpoints for the service
|
// Thus the set of nodes with local endpoints for the service
|
||||||
|
Loading…
Reference in New Issue
Block a user