Updated ReplicaSetTest so that retries to insert on error