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