kaxil commented on a change in pull request #8884:
URL: https://github.com/apache/airflow/pull/8884#discussion_r426139517



##########
File path: tests/utils/test_dag_processing.py
##########
@@ -377,34 +377,35 @@ class path, thus when reloading logging module the 
airflow.processor_manager
         logger should not be configured.
         """
         with settings_context(SETTINGS_FILE_VALID):
-            # Launch a process through DagFileProcessorAgent, which will try
-            # reload the logging module.
-            test_dag_path = os.path.join(TEST_DAG_FOLDER, 
'test_scheduler_dags.py')
-            async_mode = 'sqlite' not in conf.get('core', 'sql_alchemy_conn')
-            log_file_loc = conf.get('logging', 
'DAG_PROCESSOR_MANAGER_LOG_LOCATION')
-
-            try:
-                os.remove(log_file_loc)
-            except OSError:
-                pass
-
-            # Starting dag processing with 0 max_runs to avoid redundant 
operations.
-            processor_agent = DagFileProcessorAgent(test_dag_path,
-                                                    0,
-                                                    
type(self)._processor_factory,
-                                                    timedelta.max,
-                                                    [],
-                                                    False,
-                                                    async_mode)
-            processor_agent.start()
-            if not async_mode:
-                processor_agent.run_single_parsing_loop()
-
-            processor_agent._process.join()
-            # Since we are reloading logging config not creating this file,
-            # we should expect it to be nonexistent.
-
-            self.assertFalse(os.path.isfile(log_file_loc))
+            with env_vars({('logging', 'logging_config_class'): 
'custom_airflow_local_settings.LOGGING_CONFIG'}):

Review comment:
       ```suggestion
               with env_vars({
                   ('logging', 'logging_config_class'): 
'custom_airflow_local_settings.LOGGING_CONFIG'
               }):
   ```




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