Skip to content
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

[6.15.z] Remove sleeps and make cron expression more accurate #15209

Conversation

Satellite-QE
Copy link
Collaborator

Cherrypick of PR: #15172

Problem Statement

The sleeps in these tests result in inconsistent behavior and the cron expression is malformed, leading to 2 seperate faliures. This PR will fix both.

Solution

Removed the sleep by setting max_tries to 20 on the task poll, reformatted the cron expression to always accurately set the sync time to 5 minutes after the plan is created. 5 minutes is required here due to slow interactions with the UI sometimes resulting in the product not being added until after the sync time had passed.

trigger: test-robottelo
pytest: tests/foreman/ui/test_contenthost.py -k 'test_positive_synchronize_custom_product_custom_cron_real_time'

* Remove sleeps and make cron expression more accurate

* Use minutes instead of seconds variable

(cherry picked from commit 75de548)
@Satellite-QE Satellite-QE requested a review from a team as a code owner May 29, 2024 09:58
@Satellite-QE Satellite-QE added 6.15.z Introduced in or relating directly to Satellite 6.15 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels May 29, 2024
@Satellite-QE
Copy link
Collaborator Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_syncplan.py -k 'test_positive_synchronize_custom_product_custom_cron_real_time'

@vsedmik vsedmik added the AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing label May 29, 2024
@Satellite-QE
Copy link
Collaborator Author

PRT Result

Build Number: 7161
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_syncplan.py -k test_positive_synchronize_custom_product_custom_cron_real_time --external-logging
Test Result : =========== 1 passed, 4 deselected, 20 warnings in 878.72s (0:14:38) ===========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label May 29, 2024
@Satellite-QE Satellite-QE merged commit 55aa0d7 into 6.15.z May 29, 2024
17 of 18 checks passed
@Satellite-QE Satellite-QE deleted the cherry-pick-6.15.z-75de54892ccd248c4596a3f8bafa9e740b9d15b8 branch May 29, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.15.z Introduced in or relating directly to Satellite 6.15 Auto_Cherry_Picked Automatically cherrypicked PR using GHA AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing No-CherryPick PR doesnt need CherryPick to previous branches PRT-Passed Indicates that latest PRT run is passed for the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants