diff --git a/Makefile b/Makefile index 2190e3914a..ff0baef8d0 100644 --- a/Makefile +++ b/Makefile @@ -784,7 +784,7 @@ ifeq ($(CLUSTER_TYPE), openstack) KVM_EMULATION = false endif -OPENSHIFT_CI ?= true +OPENSHIFT_CI ?= false OADP_BUCKET ?= $(shell cat $(OADP_BUCKET_FILE)) SETTINGS_TMP=/tmp/test-settings @@ -816,6 +816,7 @@ HCP_EXTERNAL_ARGS ?= "" TEST_CLI ?= false SKIP_MUST_GATHER ?= false TEST_UPGRADE ?= false +FAIL_FAST ?= true TEST_FILTER = (($(shell echo '! aws && ! gcp && ! azure && ! ibmcloud' | \ $(SED) -r "s/[&]* [!] $(CLUSTER_TYPE)|[!] $(CLUSTER_TYPE) [&]*//")) || $(CLUSTER_TYPE)) #TEST_FILTER := $(shell echo '! aws && ! gcp && ! azure' | $(SED) -r "s/[&]* [!] $(CLUSTER_TYPE)|[!] $(CLUSTER_TYPE) [&]*//") @@ -845,11 +846,15 @@ ifeq ($(TEST_CLI),true) else TEST_FILTER += && (! cli) endif - +# Do not fail fast in OpenShift CI, it's expensive to start the cluster, run all tests and report the results. +ifeq ($(OPENSHIFT_CI),true) + FAIL_FAST = false +endif GINKGO_FLAGS = --vv \ --no-color=$(OPENSHIFT_CI) \ --label-filter="$(TEST_FILTER)" \ --junit-report="$(ARTIFACT_DIR)/junit_report.xml" \ + --fail-fast=$(FAIL_FAST) \ --timeout=2h .PHONY: test-e2e diff --git a/tests/e2e/lib/k8s_common_helpers.go b/tests/e2e/lib/k8s_common_helpers.go index b7bb9e2767..9aba5778df 100755 --- a/tests/e2e/lib/k8s_common_helpers.go +++ b/tests/e2e/lib/k8s_common_helpers.go @@ -17,6 +17,7 @@ import ( "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" "k8s.io/client-go/tools/remotecommand" + "k8s.io/utils/ptr" ) type ProxyPodParameters struct { @@ -296,7 +297,7 @@ func DeleteAllPVCsInNamespace(clientset *kubernetes.Clientset, namespace string) // Delete each PVC for _, pvc := range pvcList.Items { log.Printf("Deleting PVC %s in namespace %s", pvc.Name, namespace) - err := clientset.CoreV1().PersistentVolumeClaims(namespace).Delete(ctx, pvc.Name, metav1.DeleteOptions{}) + err := clientset.CoreV1().PersistentVolumeClaims(namespace).Delete(ctx, pvc.Name, metav1.DeleteOptions{GracePeriodSeconds: ptr.To(int64(0))}) if err != nil && !apierrors.IsNotFound(err) { log.Printf("Warning: Failed to delete PVC %s in namespace %s: %v", pvc.Name, namespace, err) }