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


##########
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 creates side effect that might impact other tests later.
   
   This might create only if we touch other parts which read this variable 
during test running, as we have before.
   
   E.g. `attr_2` depend on `attr_1`. Test_1 mokeypatch `attr_1` and somehow 
involve `attr_2`, after execution `attr_1` return it previous value, but not 
for `attr_2`. Test 2 run test and use `attrt_2` the value unexpected and test 
failed. 



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