@@ -280,20 +280,7 @@ var _ = Describe("AppWrapper E2E Test", func() {
280280 Eventually (AppWrapperPhase (ctx , aw ), 60 * time .Second ).Should (Equal (workloadv1beta2 .AppWrapperSucceeded ))
281281 })
282282
283- It ("A failed Batch Job yields a failed AppWrapper" , func () {
284- aw := toAppWrapper (failingBatchjob (500 ))
285- if aw .Annotations == nil {
286- aw .Annotations = make (map [string ]string )
287- }
288- aw .Annotations [workloadv1beta2 .FailureGracePeriodDurationAnnotation ] = "0s"
289- aw .Annotations [workloadv1beta2 .RetryLimitAnnotation ] = "0"
290- Expect (getClient (ctx ).Create (ctx , aw )).To (Succeed ())
291- appwrappers = append (appwrappers , aw )
292- Expect (waitAWPodsReady (ctx , aw )).Should (Succeed ())
293- Eventually (AppWrapperPhase (ctx , aw ), 90 * time .Second ).Should (Equal (workloadv1beta2 .AppWrapperFailed ))
294- })
295-
296- It ("Failed Jobs will be retried up to retryLimit" , func () {
283+ It ("A failed Batch Job will be Reset up to retryLimit and then Failed" , func () {
297284 aw := toAppWrapper (failingBatchjob (500 ))
298285 if aw .Annotations == nil {
299286 aw .Annotations = make (map [string ]string )
@@ -348,6 +335,26 @@ var _ = Describe("AppWrapper E2E Test", func() {
348335 })
349336 })
350337
338+ Describe ("Detection of Startup Failures" , Label ("slow" ), Label ("Kueue" , "Standalone" ), func () {
339+ It ("Job with stuck init is detected and Failed" , func () {
340+ aw := toAppWrapper (stuckInitBatchjob (100 ))
341+ if aw .Annotations == nil {
342+ aw .Annotations = make (map [string ]string )
343+ }
344+ aw .Annotations [workloadv1beta2 .FailureGracePeriodDurationAnnotation ] = "10s"
345+ aw .Annotations [workloadv1beta2 .WarmupGracePeriodDurationAnnotation ] = "10s"
346+ aw .Annotations [workloadv1beta2 .RetryLimitAnnotation ] = "1"
347+ aw .Annotations [workloadv1beta2 .RetryPausePeriodDurationAnnotation ] = "0s"
348+ Expect (getClient (ctx ).Create (ctx , aw )).To (Succeed ())
349+ appwrappers = append (appwrappers , aw )
350+ Eventually (AppWrapperPhase (ctx , aw ), 30 * time .Second ).Should (Equal (workloadv1beta2 .AppWrapperRunning ))
351+ Eventually (AppWrapperPhase (ctx , aw ), 30 * time .Second ).Should (Equal (workloadv1beta2 .AppWrapperResetting ))
352+ Eventually (AppWrapperPhase (ctx , aw ), 180 * time .Second ).Should (Equal (workloadv1beta2 .AppWrapperFailed ))
353+ aw = getAppWrapper (ctx , types.NamespacedName {Name : aw .Name , Namespace : aw .Namespace })
354+ Expect (aw .Status .Retries ).Should (Equal (int32 (1 )))
355+ })
356+ })
357+
351358 Describe ("Load Testing" , Label ("slow" ), Label ("Kueue" , "Standalone" ), func () {
352359 It ("Create 50 AppWrappers" , func () {
353360 const (
0 commit comments