-
Notifications
You must be signed in to change notification settings - Fork 116
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
Add some randomness to CV publish break down #14782
Conversation
trigger: test-robottelo |
).create() | ||
try: | ||
publish_task = cv.publish(synchronous=False) | ||
sleep_time = random.randint(0, 60) # publish takes ~70s in 6.15 and SatLab VM | ||
sleep(sleep_time) | ||
target_sat.power_control(state='reboot', ensure=True) |
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.
I wonder if mere f-m service restart
wouldn't do the same job here (w/o need to spin AAP WF).
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.
Decided to test that out with parametrization (second commit).
PRT Result
|
).create() | ||
try: | ||
publish_task = cv.publish(synchronous=False) | ||
sleep_time = random.randint(0, 60) # publish takes ~70s in 6.15 and SatLab VM | ||
sleep(sleep_time) |
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.
Are we able to use wait_for task here? so if publish takes longer than normal we can still pass through?
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.
Actually there is nothing specific we would wait for here. We just need to break the publish task in a random time while it's still running and check it succeeds later (after resume if needed). So we just need "wait for random time" which is done by that sleep.
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.
Looks good, Ack 👍
Pending comment from @ColeHiggins2's review.
trigger: test-robottelo |
PRT Result
|
trigger: test-robottelo |
PRT Result
|
PRT Result
|
def test_positive_reboot_recover_cv_publish(target_sat, function_entitlement_manifest_org): | ||
@pytest.mark.parametrize('reboot', [True, False], ids=['vm_reboot', 'fm_restart']) | ||
def test_positive_reboot_recover_cv_publish( | ||
target_sat, module_sca_manifest_org, module_big_repos, reboot |
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.
target_sat, module_sca_manifest_org, module_big_repos, reboot | |
module_target_sat, module_sca_manifest_org, module_big_repos, reboot |
module_big_repos
is using module_target_sat
and the test is using target_sat
, seems like a mistake.
Same suggestion for the rest of the target_sat
occurrences.
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.
Yeah, but I guess it won't help since we are a bit destructive here, so we get new Satellite for each test run here, which means we need new setup for each parametrized test which makes me cry and doubt if I really want to do the setup twice just to check the f-m restart
.
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.
Okay so it seems it did help, PRT passed.
trigger: test-robottelo |
PRT Result
|
* Add some randomness to CV publish break down * Parametrize for f-m service restart too (cherry picked from commit 869694e)
Add some randomness to CV publish break down (#14782) * Add some randomness to CV publish break down * Parametrize for f-m service restart too (cherry picked from commit 869694e) Co-authored-by: vsedmik <[email protected]>
* Add some randomness to CV publish break down * Parametrize for f-m service restart too
Problem Statement
In CV eval it was suggested to add some randomness into the CV publish interruption so that we cover different phases of the publish task and go more real-life.
Solution
Add some sleep and few other adjustments.
PRT test Cases example
trigger: test-robottelo
pytest: tests/foreman/destructive/test_contentview.py