Skip to content

Commit ba4e3c2

Browse files
potiukCloud Composer Team
authored and
Cloud Composer Team
committed
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 pytest-dev/pytest-xdist#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. GitOrigin-RevId: 8507ad9e543d7e838d7f16e8e9e8dfd3931b8f33
1 parent d17b3fe commit ba4e3c2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/providers/microsoft/azure/triggers/test_wasb.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
TEST_WASB_CONN_ID = "wasb_default"
3636
POKE_INTERVAL = 5.0
3737

38+
pytestmark = pytest.mark.db_test
39+
3840

3941
class TestWasbBlobSensorTrigger:
4042
TRIGGER = WasbBlobSensorTrigger(
@@ -78,7 +80,6 @@ async def test_running(self, mock_check_for_blob, blob_exists):
7880
assert task.done() is False
7981
asyncio.get_event_loop().stop()
8082

81-
@pytest.mark.db_test
8283
@pytest.mark.asyncio
8384
@mock.patch("airflow.providers.microsoft.azure.hooks.wasb.WasbAsyncHook.check_for_blob_async")
8485
async def test_success(self, mock_check_for_blob):
@@ -115,7 +116,6 @@ async def test_waiting_for_blob(self, mock_check_for_blob, caplog):
115116
assert message in caplog.text
116117
asyncio.get_event_loop().stop()
117118

118-
@pytest.mark.db_test
119119
@pytest.mark.asyncio
120120
@mock.patch("airflow.providers.microsoft.azure.hooks.wasb.WasbAsyncHook.check_for_blob_async")
121121
async def test_trigger_exception(self, mock_check_for_blob):
@@ -170,7 +170,6 @@ async def test_running(self, mock_check_for_prefix, prefix_exists):
170170
assert task.done() is False
171171
asyncio.get_event_loop().stop()
172172

173-
@pytest.mark.db_test
174173
@pytest.mark.asyncio
175174
@mock.patch("airflow.providers.microsoft.azure.hooks.wasb.WasbAsyncHook.check_for_prefix_async")
176175
async def test_success(self, mock_check_for_prefix):
@@ -208,7 +207,6 @@ async def test_waiting_for_blob(self, mock_check_for_prefix):
208207
mock_log_info.assert_called_once_with(message)
209208
asyncio.get_event_loop().stop()
210209

211-
@pytest.mark.db_test
212210
@pytest.mark.asyncio
213211
@mock.patch("airflow.providers.microsoft.azure.hooks.wasb.WasbAsyncHook.check_for_prefix_async")
214212
async def test_trigger_exception(self, mock_check_for_prefix):

0 commit comments

Comments
 (0)