Make tests resilient