fix(e2e-tests): timeout failures during jenkins job checks

* increase retry on job creation to fix failing test `performs backups before pod deletion and restores them even Jenkins status is restarted`
* allow retry on error when retrieving finished job to fix failing test `runs kubernetes plugin job successfully`
This commit is contained in:
xmbhasin 2025-03-28 13:07:26 -04:00
parent a0a1a7a84d
commit dc33f507e7
2 changed files with 11 additions and 6 deletions

View File

@ -30,7 +30,7 @@ func waitForJobCreation(jenkinsClient client.Jenkins, jobID string) {
return false, err return false, err
} }
return err == nil, err return err == nil, err
}, time.Minute*3, time.Second*2).Should(BeTrue()) }, time.Duration(110)*retryInterval, retryInterval).Should(BeTrue())
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
} }

View File

@ -266,9 +266,14 @@ func verifyJobHasBeenRunCorrectly(jenkinsClient jenkinsclient.Jenkins, jobID str
Eventually(func() (bool, error) { Eventually(func() (bool, error) {
job, err = jenkinsClient.GetJob(context.TODO(), jobID) job, err = jenkinsClient.GetJob(context.TODO(), jobID)
Expect(err).To(BeNil()) if err != nil {
return false, err
}
build, err = job.GetLastBuild(context.TODO()) build, err = job.GetLastBuild(context.TODO())
Expect(err).To(BeNil()) if err != nil {
return false, err
}
By("evaluating correctness of the outcome") By("evaluating correctness of the outcome")
return build.IsGood(context.TODO()), err return build.IsGood(context.TODO()), err