Details
Description
This makes the test robust to things like both shard replica set nodes running for election at the same time and losing the first election, and therefore it taking longer than the 20 seconds that mongos waits to find a primary for a CRUD command for a new primary to be elected.