Skip to content

Commit c948af1

Browse files
committed
fix: don't fail test if the CRD cannot be deleted
Signed-off-by: xstefank <[email protected]>
1 parent e764a11 commit c948af1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

operator-framework-junit5/src/main/java/io/javaoperatorsdk/operator/junit/LocallyRunOperatorExtension.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
public class LocallyRunOperatorExtension extends AbstractOperatorExtension {
4343

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

0 commit comments

Comments
 (0)