This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new e27f30d6e25 Fix MySQL lock polling in scheduler regression test 
(#77503)
e27f30d6e25 is described below

commit e27f30d6e2522447da9e7dad13999945922b3817
Author: Aaron Chen <[email protected]>
AuthorDate: Mon Nov 23 22:34:24 2026 -0800

    Fix MySQL lock polling in scheduler regression test (#77503)
---
 airflow-core/tests/unit/jobs/test_scheduler_job.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/airflow-core/tests/unit/jobs/test_scheduler_job.py 
b/airflow-core/tests/unit/jobs/test_scheduler_job.py
index 114bbe37803..cb4bc8d1bea 100644
--- a/airflow-core/tests/unit/jobs/test_scheduler_job.py
+++ b/airflow-core/tests/unit/jobs/test_scheduler_job.py
@@ -4177,7 +4177,9 @@ class TestSchedulerJob:
                 if future.done():
                     pytest.fail(f"the selection did not wait on the writer's 
locks: {future.result()}")
                 assert time.monotonic() < deadline, "the selection did not 
wait on the writer's locks"
-                time.sleep(0.05)
+                # MySQL refreshes information_schema.innodb_trx only after it 
has gone unread for 100ms,
+                # so polling faster keeps returning the state from before the 
selection waited.
+                time.sleep(0.2)
             # A user marks one of the task instances success while the 
selection runs.
             writer.execute(
                 update(TaskInstance)

Reply via email to