(#2608) - race condition in sync replication test

like #2611 but not combined with #2593