Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't fail test if the CRD cannot be deleted #2729

Merged
merged 1 commit into from
Mar 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
public class LocallyRunOperatorExtension extends AbstractOperatorExtension {

private static final Logger LOGGER = LoggerFactory.getLogger(LocallyRunOperatorExtension.class);
private static final int CRD_DELETE_TIMEOUT = 1000;
private static final int CRD_DELETE_TIMEOUT = 5000;
private static final Set<AppliedCRD> appliedCRDs = new HashSet<>();
private static final boolean deleteCRDs =
Boolean.parseBoolean(System.getProperty("testsuite.deleteCRDs", "true"));
Expand Down Expand Up @@ -343,7 +343,8 @@ private void deleteCrd(AppliedCRD appliedCRD, KubernetesClient client) {
crd.withTimeoutInMillis(CRD_DELETE_TIMEOUT).delete();
LOGGER.debug("Deleted CRD with path: {}", appliedCRD.path);
} catch (Exception ex) {
throw new IllegalStateException("Cannot delete CRD yaml: " + appliedCRD.path, ex);
LOGGER.warn(
"Cannot delete CRD yaml: {}. You might need to delete it manually.", appliedCRD.path, ex);
}
}

Expand Down