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

Try and reduce flakiness of number of test call asserts #46276

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

amoghrajesh
Copy link
Contributor

Saw such failures in CI:

TestDbtCloudRunJobOperator.test_execute_wait_for_termination[default_account-2-timeout] _
providers/tests/dbt/cloud/operators/test_dbt.py:290: in test_execute_wait_for_termination
    assert mock_get_job_run.call_count == 4
E   AssertionError: assert 2 == 4
E    +  where 2 = <MagicMock name='get_job_run' id='139851324412688'>.call_count

Example run https://github.com/apache/airflow/actions/runs/13044119066

We can just make it more dynamic by expecting the max calls and asserting that we have finished sooner.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@amoghrajesh amoghrajesh merged commit 1b43499 into apache:main Jan 30, 2025
62 checks passed
@potiuk
Copy link
Member

potiuk commented Jan 30, 2025

nice!

got686-yandex pushed a commit to got686-yandex/airflow that referenced this pull request Jan 30, 2025
dabla pushed a commit to dabla/airflow that referenced this pull request Jan 30, 2025
ambika-garg pushed a commit to ambika-garg/airflow that referenced this pull request Jan 30, 2025
niklasr22 pushed a commit to niklasr22/airflow that referenced this pull request Feb 8, 2025
ambika-garg pushed a commit to ambika-garg/airflow that referenced this pull request Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants