FLUSHALL will fail on read-only slaves, but there the command is not needed in order to reset the instance with CLUSTER RESET so errors can be ignored.
Do things in a sequence that prevents failover during failure detection.
This makes tests a bit slower, but it is better to test things at a decent scale instead of using just a few nodes, and for a few tests we actually need so many nodes.