kubernetes/test/e2e/common/node
Dawei Wei b763eaf594 test/e2e/common/node: poll for eventually-consistent state to reduce flakiness
These tests have race conditions where they assume immediate state
visibility after a pod transitions to Running. The current code works
on fast runtimes but is fundamentally racy: kubelet log streaming,
log file flushing, and container status updates are eventually
consistent, not synchronous.

Switching to gomega.Eventually polling makes the tests deterministic.
The success path on fast runtimes is unchanged (polling succeeds on
first attempt), but the tests now correctly handle scenarios where
state takes a moment to propagate. This benefits any environment
where containers may take longer to start (VM-isolated runtimes such
as Kata, gVisor, and Windows Hyper-V; overloaded CI VMs; shared
multi-tenant clusters).

- ephemeral_containers.go (both 'should be added' and 'should update'
  tests): the 'polo' log-content check is polled via gomega.Eventually
  with f.Timeouts.PodStartShort. The container may report Running
  before its first stdout has been flushed.

- lifecycle_hook.go ('ignore terminated container'): use
  f.Timeouts.PodDelete instead of gracePeriod*time.Second for the
  termination wait. The actual correctness check (container's intrinsic
  StartedAt/FinishedAt < sleepSeconds) is unchanged and unaffected by
  how long we waited.

- pods.go ('retrieving logs from the container over websockets'):
  poll the websocket open and read via gomega.Eventually. The container
  can be reported Running before its first stdout line has been flushed,
  so opening the websocket immediately may return an empty or partial
  buffer.
2026-05-12 11:38:18 -07:00
..
framework nominate natasha41575 as subpackage approver 2026-04-23 16:48:43 +00:00
configmap.go feat: Add matcher and conformance tests ensuring that RV is uint128 2025-10-01 00:01:50 +00:00
container.go node e2e: add tests for Ensure Secret Image Pulls default policy 2025-11-11 11:15:53 -05:00
container_probe.go Remove SidecarContainers feature gate 2026-03-19 15:56:47 +08:00
container_restart_policy.go Refactor container restart policy tests to e2e/common/node 2026-03-09 23:05:05 +00:00
containers.go set timeout to a minute to see if this resolves flakes 2024-09-18 09:03:34 -04:00
downwardapi.go Label unlabeled e2e node tests 2026-03-12 09:02:24 +01:00
ephemeral_containers.go test/e2e/common/node: poll for eventually-consistent state to reduce flakiness 2026-05-12 11:38:18 -07:00
expansion.go Graduate RelaxedEnvironmentVariableValidation Feature gate to GA 2025-06-07 20:32:03 +08:00
file_key.go Label unlabeled e2e node tests 2026-03-12 09:02:24 +01:00
framework.go e2e: enhance SIGDescribe 2023-10-10 18:15:49 +02:00
image_credential_provider.go E2E: remove unnecessary trailing spaces in test names 2026-01-07 12:05:43 +01:00
image_volume.go mark ImageVolume conformance test to LinuxOnly 2026-03-12 15:48:50 +08:00
init_container.go Fix E2E error message 2024-06-09 00:36:04 +00:00
kubelet.go test/e2e: do not use global variable for image 2024-04-22 19:29:39 +08:00
kubelet_etc_hosts.go e2e tests: Enables should test kubelet managed /etc/hosts file for Windows 2024-05-31 07:45:07 +00:00
lease.go feat: Add matcher and conformance tests ensuring that RV is uint128 2025-10-01 00:01:50 +00:00
lifecycle_hook.go test/e2e/common/node: poll for eventually-consistent state to reduce flakiness 2026-05-12 11:38:18 -07:00
node_lease.go Label unlabeled e2e node tests 2026-03-12 09:02:24 +01:00
OWNERS Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
pod_admission.go KEP-5471: Extend tolerations operators (#134665) 2025-11-10 12:42:54 -08:00
pod_hostnameoverride.go Label unlabeled e2e node tests 2026-03-12 09:02:24 +01:00
pod_level_resources.go e2e test for resize of non-sidecar init containers 2026-03-19 00:43:57 +00:00
pod_level_resources_resize.go Simplify isPodLevelResourcesResizeInProgress to check for absence of actuated resources 2026-03-27 23:03:20 +00:00
pod_resize.go e2e test for resize of non-sidecar init containers 2026-03-19 00:43:57 +00:00
pods.go test/e2e/common/node: poll for eventually-consistent state to reduce flakiness 2026-05-12 11:38:18 -07:00
podtemplates.go feat: Add matcher and conformance tests ensuring that RV is uint128 2025-10-01 00:01:50 +00:00
privileged.go e2e: use framework labels 2023-11-01 15:17:34 +01:00
runtime.go Add timeout to ImagePullTest poll loop to prevent infinite hangs 2026-01-23 18:19:17 -05:00
runtimeclass.go feat: Add matcher and conformance tests ensuring that RV is uint128 2025-10-01 00:01:50 +00:00
secrets.go feat: Add matcher and conformance tests ensuring that RV is uint128 2025-10-01 00:01:50 +00:00
security_context.go Merge pull request #137869 from yangjunmyfm192085/skiptest 2026-04-23 04:15:22 +05:30
sysctl.go drop MinimumKubeletVersion for unsupported kubelet versions 2025-11-05 14:25:20 -08:00