diff options
author | Bert JW Regeer <bertjw@regeer.org> | 2022-01-17 15:10:03 -0700 |
---|---|---|
committer | Bert JW Regeer <bertjw@regeer.org> | 2022-01-17 15:36:34 -0700 |
commit | b502635db39a85248de4501e87a0ce5fb2d473d6 (patch) | |
tree | d9fd782c7f2303bf402643803c81f0f0fb840754 | |
parent | 73a0fbe575f3519acd3eb8d51be6ce9a0dc2551e (diff) | |
download | waitress-b502635db39a85248de4501e87a0ce5fb2d473d6.tar.gz |
Call gc.collect() cause these tests leak file descriptors
-rw-r--r-- | tests/test_functional.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_functional.py b/tests/test_functional.py index 3103391..4d1bcc3 100644 --- a/tests/test_functional.py +++ b/tests/test_functional.py @@ -102,6 +102,15 @@ class SubprocessTests: self.proc.join() self.proc.close() + # The following is for the benefit of PyPy 3, for some reason it is + # holding on to some resources way longer than necessary causing tests + # to fail with file desctriptor exceeded errors on macOS which defaults + # to 256 file desctriptors per process. While we could use ulimit to + # increase the limits before running tests, this works as well and + # means we don't need to remember to do that. + import gc + gc.collect() + def assertline(self, line, status, reason, version): v, s, r = (x.strip() for x in line.split(None, 2)) self.assertEqual(s, status.encode("latin-1")) |