kubernetes/pkg/controller/volume/persistentvolume
Davanum Srinivas 72b6f1b590
persistentvolume: deflake TestControllerSync 5-2-3 startup race
Subtest 5-2-3 starts the controller with both the claim and the volume
already present and with the volume annotated as controller-bound. That
setup depends on watch/list ordering during controller startup: if the
initial objects are observed in a different order, the test can time out
even though the controller later converges to the expected state.

Model the scenario more explicitly. Start with the unbound volume only,
then inject the claim through AddClaimEvent after the controller is
running. Also drop the pre-set controller-bound annotation from the
initial volume since the binding is what the test wants the controller to
establish.

Tested:
go test -race ./pkg/controller/volume/persistentvolume -run TestControllerSync -count=50
2026-03-14 11:58:33 -04:00
..
config chore: depr. pointer pkg replacement for pkg/controller 2025-07-07 13:22:36 +02:00
metrics Rename volume_operation_total_errors to volume_operation_errors_total 2026-02-28 20:08:07 +08:00
options hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
testing Add a replacement for cmp.Diff using json+go-difflib 2025-06-16 17:10:42 -04:00
binder_test.go locked the feature-gate VolumeAttributesClass to default (true) and switch storage version from v1beta1 to v1 2025-12-18 15:59:33 +08:00
delete_test.go Remove feature gate HonorPVReclaimPolicy 2026-02-06 13:31:16 +08:00
framework_test.go Remove redundant re-assignment in for-loops under pkg 2026-03-02 08:47:43 +01:00
index.go pvc bind pv with vac 2024-07-23 15:04:11 +08:00
index_test.go locked the feature-gate VolumeAttributesClass to default (true) and switch storage version from v1beta1 to v1 2025-12-18 15:59:33 +08:00
provision_test.go Remove feature gate HonorPVReclaimPolicy 2026-02-06 13:31:16 +08:00
pv_controller.go Merge pull request #134290 from huww98/kcm-no-get-pv 2026-03-12 05:13:35 +05:30
pv_controller_base.go Deprecate obsolete slice utility functions 2026-02-16 10:04:33 +01:00
pv_controller_test.go persistentvolume: deflake TestControllerSync 5-2-3 startup race 2026-03-14 11:58:33 -04:00
recycle_test.go volume: use contextual logging 2023-03-14 08:37:30 +08:00
volume_host.go remove GetHostName func from the VolumeHost interface 2026-01-19 11:35:30 +08:00