Returns whether the current failure should retry.
bool shouldRetry(int failureCount, Object error) => _test(failureCount, error);