-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(QENG-7422) Add wait_time and max_connection_tries to exec.reboot #1625
(QENG-7422) Add wait_time and max_connection_tries to exec.reboot #1625
Conversation
Prior to this commit there was no way to customize the behavior of the Host::Unix::Exec.reboot method. This meant that if you had a host that took a particularly long time to come back from a reboot, your tests would fail. This commit adds two parameters, `wait_time` and `max_connection_tries`, which will modify how long to wait before checking on the host after rebooting it and how many times to attempt connecting to the host after the reboot. As noted in the method comment, the `max_connection_tries` uses a fibbonacci backoff so increasing it will not increase the time spent waiting for reconnection in a linear way. Additionally, I have added specs for these parameters and mocked out `Kernel.sleep` in the specs so that they run faster.
@highb You can run our full test suites with any changes, if you
|
@trevor-vaughan That is super helpful, thank you! |
Found a small issue with the default nodeset for running the tests, put up a PR to fix it. simp/rubygem-simp-beaker-helpers#119 edit: Determined a fix for the issue in beaker itself by setting a sensible |
I got the https://github.com/simp/rubygem-simp-beaker-helpers tests to pass using a Beaker branch containing this PR and #1628 so I think once #1628 is reviewed/merged and the acceptance tests are happy again, this is ready to review/merge. |
Jenkins, test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to make the comment and code match then GTG as far as I can tell.
Prior to this commit if the `uptime` command did not reset after the provided `wait_time`, we would assume that the host wasn't going to reboot. This commit adds an `uptime_retries` parameter to the `Unix::Exec.reboot` method that specifies how many times Beaker should attempt to check the result of the `uptime` command before giving up on the host.
ffd92b6
to
b6f5ea4
Compare
Jenkins, test this please |
2 similar comments
Jenkins, test this please |
Jenkins, test this please |
@genebean Could you review again, please? |
Prior to this commit there was no way to customize the behavior of the
Host::Unix::Exec.reboot method. This meant that if you had a host that
took a particularly long time to come back from a reboot, your tests
would fail.
This commit adds two parameters,
wait_time
andmax_connection_tries
,which will modify how long to wait before checking on the host after
rebooting it and how many times to attempt connecting to the host after
the reboot. As noted in the method comment, the
max_connection_tries
uses a fibbonacci backoff so increasing it will not increase the time
spent waiting for reconnection in a linear way.
Additionally, I have added specs for these parameters and mocked out
Kernel.sleep
in the specs so that they run faster.