Unverified Commit 02589246 authored by moto's avatar moto Committed by GitHub
Browse files

Make HTTP fetch test more reliable (#1512)

Since the update of Xcode, some of HTTP tests are failing on macOS, due to `reqests.get` fails to establish a connection to local server. This change increase the wait time to 2 seconds before test starts.
parent 7078fcd3
...@@ -59,8 +59,9 @@ class HttpServerMixin(TempDirMixin): ...@@ -59,8 +59,9 @@ class HttpServerMixin(TempDirMixin):
super().setUpClass() super().setUpClass()
cls._proc = subprocess.Popen( cls._proc = subprocess.Popen(
['python', '-m', 'http.server', f'{cls._port}'], ['python', '-m', 'http.server', f'{cls._port}'],
cwd=cls.get_base_temp_dir()) cwd=cls.get_base_temp_dir(),
time.sleep(1.0) stderr=subprocess.DEVNULL) # Disable server-side error log because it is confusing
time.sleep(2.0)
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment