ashb commented on a change in pull request #8871:
URL: https://github.com/apache/airflow/pull/8871#discussion_r425184805



##########
File path: tests/utils/test_dag_processing.py
##########
@@ -85,6 +87,23 @@ class TestDagFileProcessorManager(unittest.TestCase):
     def setUp(self):
         clear_db_runs()
 
+    def run_processor_manager_one_loop(self, manager, parent_pipe):
+        if not manager._async_mode:
+            parent_pipe.send(DagParsingSignal.AGENT_RUN_ONCE)
+
+        results = []
+
+        while True:  # pylint: disable=too-many-nested-blocks
+            manager._run_parsing_loop()
+
+            while parent_pipe.poll(timeout=0.01):
+                obj = parent_pipe.recv()
+                if isinstance(obj, DagParsingStat):
+                    if obj.done:
+                        return results
+                    continue
+                results.append(obj)

Review comment:
       Done.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to