@@ -835,6 +835,8 @@ var _ = framework.KubeDescribe("Pods", func() {
835
835
ginkgo .It ("should delete a collection of pods" , func () {
836
836
podTestNames := []string {"test-pod-1" , "test-pod-2" , "test-pod-3" }
837
837
838
+ zero := int64 (0 )
839
+
838
840
ginkgo .By ("Create set of pods" )
839
841
// create a set of pods in test namespace
840
842
for _ , podTestName := range podTestNames {
@@ -845,6 +847,7 @@ var _ = framework.KubeDescribe("Pods", func() {
845
847
"type" : "Testing" },
846
848
},
847
849
Spec : v1.PodSpec {
850
+ TerminationGracePeriodSeconds : & zero ,
848
851
Containers : []v1.Container {{
849
852
Image : imageutils .GetE2EImage (imageutils .Agnhost ),
850
853
Name : "token-test" ,
@@ -861,7 +864,7 @@ var _ = framework.KubeDescribe("Pods", func() {
861
864
framework .ExpectNoError (err , "3 pods not found" )
862
865
863
866
// delete Collection of pods with a label in the current namespace
864
- err = f .ClientSet .CoreV1 ().Pods (f .Namespace .Name ).DeleteCollection (context .TODO (), metav1.DeleteOptions {}, metav1.ListOptions {
867
+ err = f .ClientSet .CoreV1 ().Pods (f .Namespace .Name ).DeleteCollection (context .TODO (), metav1.DeleteOptions {GracePeriodSeconds : & zero }, metav1.ListOptions {
865
868
LabelSelector : "type=Testing" })
866
869
framework .ExpectNoError (err , "failed to delete collection of pods" )
867
870
0 commit comments