If class setup fails, then test methods that failed in the previous execution won't be retried. In this case, we used to throw an error since we did not retry things that should be retried. This PR solves the issue by clearing the list of to-be-retried methods if class-level failure occurs. In this case, the entire class will be retried anyways, so it is safe to just clear that list. If previous run had other lifecycle errors, we track those to ensure we report successful execution of those.
Summary
If class setup fails, then test methods that failed in the previous execution won't be retried. In this case, we used to throw an error since we did not retry things that should be retried. This PR solves the issue by clearing the list of to-be-retried methods if class-level failure occurs. In this case, the entire class will be retried anyways, so it is safe to just clear that list. If previous run had other lifecycle errors, we track those to ensure we report successful execution of those.