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 8507ad9e54 Mark WASB blob tests as DB tests (#38963)
8507ad9e54 is described below
commit 8507ad9e543d7e838d7f16e8e9e8dfd3931b8f33
Author: Jarek Potiuk <[email protected]>
AuthorDate: Fri Apr 12 14:24:34 2024 +0200
Mark WASB blob tests as DB tests (#38963)
The WASB blob tests started to fail intermittently after retries were
implemented in #38910. Without understanding all the details, it
seems that the async tests run in xdist mode of tests suffer from the
bug of pytest-xdist - because the thread that runs some of the tests
is not main and it likely interferes with signals handling and is
likely an incarnation of
https://github.com/pytest-dev/pytest-xdist/issues/620
(which still needs to be solved in pytest-xdist)
Since those two tests that keeps on failing intermittently and the other
tests have been marked as db_test - likely for the same reason, we
should simply mark all the module as db_test to avoid the interference.
---
tests/providers/microsoft/azure/triggers/test_wasb.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tests/providers/microsoft/azure/triggers/test_wasb.py
b/tests/providers/microsoft/azure/triggers/test_wasb.py
index 1d6a185d48..9f1de42623 100644
--- a/tests/providers/microsoft/azure/triggers/test_wasb.py
+++ b/tests/providers/microsoft/azure/triggers/test_wasb.py
@@ -35,6 +35,8 @@ TEST_DATA_STORAGE_BLOB_PREFIX =
TEST_DATA_STORAGE_BLOB_NAME[:10]
TEST_WASB_CONN_ID = "wasb_default"
POKE_INTERVAL = 5.0
+pytestmark = pytest.mark.db_test
+
class TestWasbBlobSensorTrigger:
TRIGGER = WasbBlobSensorTrigger(
@@ -78,7 +80,6 @@ class TestWasbBlobSensorTrigger:
assert task.done() is False
asyncio.get_event_loop().stop()
- @pytest.mark.db_test
@pytest.mark.asyncio
@mock.patch("airflow.providers.microsoft.azure.hooks.wasb.WasbAsyncHook.check_for_blob_async")
async def test_success(self, mock_check_for_blob):
@@ -115,7 +116,6 @@ class TestWasbBlobSensorTrigger:
assert message in caplog.text
asyncio.get_event_loop().stop()
- @pytest.mark.db_test
@pytest.mark.asyncio
@mock.patch("airflow.providers.microsoft.azure.hooks.wasb.WasbAsyncHook.check_for_blob_async")
async def test_trigger_exception(self, mock_check_for_blob):
@@ -170,7 +170,6 @@ class TestWasbPrefixSensorTrigger:
assert task.done() is False
asyncio.get_event_loop().stop()
- @pytest.mark.db_test
@pytest.mark.asyncio
@mock.patch("airflow.providers.microsoft.azure.hooks.wasb.WasbAsyncHook.check_for_prefix_async")
async def test_success(self, mock_check_for_prefix):
@@ -208,7 +207,6 @@ class TestWasbPrefixSensorTrigger:
mock_log_info.assert_called_once_with(message)
asyncio.get_event_loop().stop()
- @pytest.mark.db_test
@pytest.mark.asyncio
@mock.patch("airflow.providers.microsoft.azure.hooks.wasb.WasbAsyncHook.check_for_prefix_async")
async def test_trigger_exception(self, mock_check_for_prefix):