diff --git a/tests/__init__.py b/tests/__init__.py index 2f37da5..9e4360b 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -349,11 +349,15 @@ class Modeltests(SimplePagureTest): self.worker.poll() if self.worker.returncode is not None: raise Exception('Worker failed to start') - wait_start = time.time() - while not pagure.lib.tasks.conn.control.ping(timeout=0.1): - time.sleep(0.1) - if time.time() - wait_start > 5: - raise Exception('Worker failed to initialize in 5 seconds') + time.sleep(2) + # The below code seems to be leaking redis connection until + # Python starts raising OSError with too many open files + # This is probably related to https://github.com/celery/celery/issues/4465 + # wait_start = time.time() + # while not pagure.lib.tasks.conn.control.ping(timeout=0.1): + # time.sleep(0.1) + # if time.time() - wait_start > 5: + # raise Exception('Worker failed to initialize in 5 seconds') self.app.get = create_maybe_waiter(self.app.get, self.app.get) self.app.post = create_maybe_waiter(self.app.post, self.app.get)