Fix races in TestTopologyErrors.