test: flaky RQ / Gunicorn tests (#37815)

2% is too low and causes flaky tests sometimes.
This commit is contained in:
Ankush Menat 2026-03-06 11:51:11 +05:30 committed by GitHub
parent 5f4334d9e3
commit 14daf5860e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1122,6 +1122,7 @@ class TestGunicornWorker(IntegrationTestCase):
path = f"http://{self.TEST_SITE}:{self.port}/api/method/ping"
self.assertEqual(requests.get(path).status_code, 200)
@unittest.skip("Flaky test")
def test_gunicorn_ping_gthread(self):
self.spawn_gunicorn(["--threads=2"])
path = f"http://{self.TEST_SITE}:{self.port}/api/method/ping"
@ -1174,9 +1175,9 @@ class TestRQWorker(IntegrationTestCase):
def test_rq_pool_idle_cpu_usage(self):
self.spawn_rq(pool=True)
self.assertLessEqual(self.get_total_usage(), 2)
self.assertLessEqual(self.get_total_usage(), 10)
for _ in range(3):
frappe.enqueue("frappe.ping")
time.sleep(1)
self.assertLessEqual(self.get_total_usage(), 2)
self.assertLessEqual(self.get_total_usage(), 10)