dimakow: Automated cherry pick of #102584: Fix race in attachdetach tests

JobBuild
103454
07-28 01:51
f9d896fa
07-28 01:49
pull-kubernetes-bazel-build 1420199681413091328
pull-kubernetes-bazel-test 1420199681446645760
pull-kubernetes-dependencies 1420199681480200192
pull-kubernetes-e2e-gce-100-performance 1420199681379536896
pull-kubernetes-e2e-gce-ubuntu-containerd 1420251080670842880 1420199681312428032
pull-kubernetes-e2e-kind 1420199681551503360
pull-kubernetes-integration 1420199681509560320
pull-kubernetes-node-e2e 1420199681337593856
pull-kubernetes-typecheck 1420199681585057792
pull-kubernetes-verify 1420199681627000832