You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2024/07/14 15:10:09 UTC
(airflow) branch main updated: Attempt to fix async sensor test flakiness (#40766)
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 95bf7e355b Attempt to fix async sensor test flakiness (#40766)
95bf7e355b is described below
commit 95bf7e355baa9acb4275d16718f9b678de8a4477
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sun Jul 14 17:10:02 2024 +0200
Attempt to fix async sensor test flakiness (#40766)
* Attempt to fix async sensor test flakiness
The #40719 introduce flakiness that only shows with self-hosted
runners - likely because the reference_time is modified in-place
by ".add" and that introduces a subtle timing issue even if
the tests are designed to avoid the timing issue.
* Update tests/sensors/test_time_delta.py
Co-authored-by: Hussein Awala <hu...@awala.fr>
---------
Co-authored-by: Hussein Awala <hu...@awala.fr>
---
tests/sensors/test_time_delta.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/sensors/test_time_delta.py b/tests/sensors/test_time_delta.py
index 159cefab9c..91a768b5b7 100644
--- a/tests/sensors/test_time_delta.py
+++ b/tests/sensors/test_time_delta.py
@@ -57,7 +57,7 @@ class TestTimeDeltaSensorAsync:
@pytest.mark.parametrize(
"data_interval_end, delta, should_deffer",
[
- (REFERENCE_TIME.add(hours=-1), timedelta(hours=1), False),
+ (REFERENCE_TIME.add(hours=-1, minutes=-1), timedelta(hours=1), False),
(REFERENCE_TIME, timedelta(hours=1), True),
],
)