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

JobBuild
103455
07-05 12:39
8357bb68
07-05 12:37
pull-kubernetes-bazel-build 1420199220878512128 1412027757168168960
pull-kubernetes-bazel-test 1420199220912066560 1412027757214306304
pull-kubernetes-dependencies 1420199220941426688 1412027757264637952
pull-kubernetes-e2e-gce-100-performance 1420199220849152000 1412027757126225920
pull-kubernetes-e2e-gce-ubuntu-containerd 1420199220777848832 1412027757033951232
pull-kubernetes-e2e-kind 1420199221012729856 1412027757348524032
pull-kubernetes-integration 1420199220974981120 1412027757302386688
pull-kubernetes-node-e2e 1420199220815597568 1412027757080088576
pull-kubernetes-typecheck 1420199221042089984 1412027757382078464
pull-kubernetes-verify 1420199221079838720 1412027757424021504