You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{Version: version.MustParse("1.32"), Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.35 when this version cannot be emulated any longer
@@ -560,11 +560,6 @@ var _ = SIGDescribe("Lifecycle Sleep Hook", framework.WithNodeConformance(), fun
560
560
ginkgo.BeforeEach(func(ctx context.Context) {
561
561
podClient=e2epod.NewPodClient(f)
562
562
})
563
-
/*
564
-
Release : v1.32
565
-
Testname: Pod Lifecycle, prestop sleep hook
566
-
Description: When a pre-stop handler is specified in the container lifecycle using a 'Sleep' action, then the handler MUST be invoked before the container is terminated. A test pod will be created to verify if its termination time aligns with the sleep time specified when it is terminated.
567
-
*/
568
563
ginkgo.It("valid prestop hook using sleep action", func(ctx context.Context) {
569
564
lifecycle:=&v1.Lifecycle{
570
565
PreStop: &v1.LifecycleHandler{
@@ -585,40 +580,32 @@ var _ = SIGDescribe("Lifecycle Sleep Hook", framework.WithNodeConformance(), fun
585
580
framework.Failf("unexpected delay duration before killing the pod, cost = %v", cost)
586
581
}
587
582
})
588
-
/*
589
-
Release : v1.32
590
-
Testname: Pod Lifecycle, prestop sleep hook with low gracePeriodSeconds
591
-
Description: When a pre-stop handler is specified in the container lifecycle using a 'Sleep' action, then the handler MUST be invoked before the container is terminated. A test pod will be created, and its `gracePeriodSeconds` will be modified to a value less than the sleep time before termination. The termination time will then be checked to ensure it aligns with the `gracePeriodSeconds` value.
592
-
*/
583
+
593
584
ginkgo.It("reduce GracePeriodSeconds during runtime", func(ctx context.Context) {
// longer than 5 seconds (we change gracePeriodSeconds to 5 seconds here, and it's less than sleep action)
598
+
// longer than 2 seconds (we change gracePeriodSeconds to 2 seconds here, and it's less than sleep action)
608
599
// shorter than sleep action (to make sure it doesn't take effect)
609
-
if!validDuration(cost, 5, 15) {
600
+
if!validDuration(cost, 2, 15) {
610
601
framework.Failf("unexpected delay duration before killing the pod, cost = %v", cost)
611
602
}
612
603
})
613
-
/*
614
-
Release : v1.32
615
-
Testname: Pod Lifecycle, prestop sleep hook with erroneous startup command
616
-
Description: When a pre-stop handler is specified in the container lifecycle using a 'Sleep' action, then the handler MUST be invoked before the container is terminated. A test pod with an erroneous startup command will be created, and upon termination, it will be checked whether it ignored the sleep time.
0 commit comments