drajguru commented on code in PR #38135:
URL: https://github.com/apache/airflow/pull/38135#discussion_r1527212639


##########
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:
   > This might create only if we touch other parts which read this variable 
during test running, as we have before.
   
   That makes sense. It's just without setting the value here 
TriggererJobRunner ends up calling setup_queue_listener() which changes the 
logging and seemingly affects subsequent test modules.



-- 
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]

Reply via email to