=con #15699 Fix race in Cluster Sharding tests

Possible fix for the race condition in the cluster sharding tests.

I've tested this myself, but I'm pretty much unable to replicate the original problem (only saw it once out of hundreds of test runs). But Jenkins seems to hit it every time, can you run this PR on Jenkins to see if the problem is fixed?

Refs #15699
Can this be solved with something else? Like a barrier. Doing Thread.sleep is not robust. How do you know that this is enough on a very slow system?