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

less flakiness in rex module #17519

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pondrejk
Copy link
Contributor

@pondrejk pondrejk commented Feb 5, 2025

Problem Statement

Trying to make a couple of problematic tests behave more predictably.

Solution

Asserting for rex status instead of result, removing some time assertions

Related Issues

@pondrejk pondrejk added CherryPick PR needs CherryPick to previous branches AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 6.16.z Introduced in or relating directly to Satellite 6.16 labels Feb 5, 2025
@pondrejk pondrejk self-assigned this Feb 5, 2025
@pondrejk pondrejk requested a review from a team as a code owner February 5, 2025 14:24
@pondrejk
Copy link
Contributor Author

pondrejk commented Feb 5, 2025

trigger: test-robottelo
pytest: tests/foreman/cli/test_remoteexecution.py -k test_positive_run_scheduled_job_template

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 10080
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/cli/test_remoteexecution.py -k test_positive_run_scheduled_job_template --external-logging
Test Result : ========== 1 passed, 71 deselected, 84 warnings in 965.24s (0:16:05) ===========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Feb 5, 2025
tests/foreman/cli/test_remoteexecution.py Show resolved Hide resolved
Comment on lines 901 to 902
sleep(30)
assert_job_invocation_result(target_sat, invocation_command['id'], client.hostname)
assert invocation_info['status'] in ['running', 'finished', 'queued']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using sleep func here, why not use wait_for here to check if job-invocation is finished?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or wait_for_tasks.

tests/foreman/cli/test_remoteexecution.py Show resolved Hide resolved
Copy link
Contributor

@vijaysawant vijaysawant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack (Pending requested changes)

@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Feb 7, 2025
Copy link
Contributor

@pnovotny pnovotny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK in general. Also pending Gaurav's & Jameer's comment about using wait_for(_tasks).

@pondrejk
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_remoteexecution.py -k test_positive_run_scheduled_job_template

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 10198
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli/test_remoteexecution.py -k test_positive_run_scheduled_job_template --external-logging
Test Result : ========== 1 failed, 71 deselected, 84 warnings in 780.49s (0:13:00) ===========

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 6.16.z Introduced in or relating directly to Satellite 6.16 AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing CherryPick PR needs CherryPick to previous branches PRT-Failed Indicates that latest PRT run is failed for the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants