drajguru commented on code in PR #38135:
URL: https://github.com/apache/airflow/pull/38135#discussion_r1525777906
##########
tests/models/test_trigger.py:
##########
@@ -142,10 +142,12 @@ def test_submit_failure(session, create_task_instance):
assert updated_task_instance.next_method == "__fail__"
-def test_assign_unassigned(session, create_task_instance):
+def test_assign_unassigned(session, create_task_instance, monkeypatch):
"""
Tests that unassigned triggers of all appropriate states are assigned.
"""
+ # disable QueueListener to prevent logging during tests
+ monkeypatch.setattr("airflow.jobs.triggerer_job_runner.DISABLE_LISTENER",
True)
Review Comment:
Without this monkeypatch the console logging gets turned on for the tests
that run after test_trigger when running all the Core tests together. The
monkeypatch should undo the setattr once the fixture goes out of scope -
https://docs.pytest.org/en/8.0.x/_modules/_pytest/monkeypatch.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]