You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/11/14 19:38:30 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #6579: [AIRFLOW-5926] Fix race-condition in TestCliWebServer

kaxil commented on a change in pull request #6579: [AIRFLOW-5926] Fix race-condition in TestCliWebServer
URL: https://github.com/apache/airflow/pull/6579#discussion_r346508652
 
 

 ##########
 File path: tests/cli/test_cli.py
 ##########
 @@ -801,30 +817,24 @@ def test_cli_webserver_foreground_with_pid(self):
     @unittest.skipIf("TRAVIS" in os.environ and bool(os.environ["TRAVIS"]),
                      "Skipping test due to lack of required file permission")
     def test_cli_webserver_background(self):
-        # Confirm that webserver hasn't been launched.
-        self.assertEqual(1, subprocess.Popen(["pgrep", "-c", "airflow"]).wait())
-        self.assertEqual(1, subprocess.Popen(["pgrep", "-c", "gunicorn"]).wait())
+        pidfile_webserver = cli.setup_locations("webserver")[0]
+        pidfile_monitor = cli.setup_locations("webserver-monitor")[0]
 
-        # Run webserver in background.
+        # Run webserver as deamon in background. Note that the wait method is not called.
 
 Review comment:
   ```suggestion
           # Run webserver as daemon in background. Note that the wait method is not called.
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services