In client.safe_restart(wait_for_reboot=True), when there is a long running job (hence the safeRestart) and safe_restart is called, the Jenkins will return a 200 status but with an error message saying system will shut down. However, the 200 status is not expected in the def __jenkins_is_unavailable, since the code assumes that the Jenkins will shut down immediately.
EXPECTED RESULTS
The client.safe_restart(wait_for_reboot=True) does not throw JenkinsAPIException and waits for the jenkins to wait for the job and reboot successfully.
ISSUE TYPE
Jenkinsapi VERSION
0.3.13 (I believe all versions are affected.)
Jenkins VERSION
2.387 (I believe all versions are affected.)
SUMMARY
In client.safe_restart(wait_for_reboot=True), when there is a long running job (hence the safeRestart) and safe_restart is called, the Jenkins will return a 200 status but with an error message saying system will shut down. However, the 200 status is not expected in the
def __jenkins_is_unavailable
, since the code assumes that the Jenkins will shut down immediately.EXPECTED RESULTS
The client.safe_restart(wait_for_reboot=True) does not throw JenkinsAPIException and waits for the jenkins to wait for the job and reboot successfully.
ACTUAL RESULTS
USEFUL INFORMATION