`kubectl proxy --port=21234 & sleep 0.5` guesses how long the proxy
needs to start listening. On a slow runner the curl that follows can
race the proxy and fail with "connection refused".
Replace the fixed `sleep 0.5` with `nc -z localhost 21234` polled until
the listener accepts a connection (10s cap). Same idiom already used in
hack/e2e-apps/bucket.bats for the seaweedfs-s3 port-forward.
Also save the proxy PID to a named variable so the trap kills the right
process even if a later background command lands first in $!.
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>