From a69bb6bd3bb84576cc862deb239db142e6240c56 Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Fri, 4 Mar 2022 08:55:22 -0500 Subject: [PATCH] e2e: `StopJob` should tolerate progress deadline expired (#12179) The `TestRescheduleProgressDeadlineFail` E2E test failed during test cleanup because the error message "progress deadline expired" that it emits when we stop the job does not match the one expected from monitoring the `job stop` command. Update the `StopJob` helper to tolerate this use case as well. --- e2e/e2eutil/job.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/e2eutil/job.go b/e2e/e2eutil/job.go index cb67ca6d5..a11419ddc 100644 --- a/e2e/e2eutil/job.go +++ b/e2e/e2eutil/job.go @@ -211,7 +211,8 @@ func StopJob(jobID string, args ...string) error { // expect that the monitor fails and exits with status code one because // technically the deployment has failed. Overwrite the error to be // nil. - if strings.Contains(err.Error(), "Description = Cancelled because job is stopped") { + if strings.Contains(err.Error(), "Description = Cancelled because job is stopped") || + strings.Contains(err.Error(), "Description = Failed due to progress deadline") { err = nil } }