diff --git a/providers/openlineage/tests/unit/openlineage/extractors/test_base.py b/providers/openlineage/tests/unit/openlineage/extractors/test_base.py index eb247567511eb..d14933ca6e822 100644 --- a/providers/openlineage/tests/unit/openlineage/extractors/test_base.py +++ b/providers/openlineage/tests/unit/openlineage/extractors/test_base.py @@ -38,7 +38,7 @@ if TYPE_CHECKING: from openlineage.client.facet_v2 import RunFacet -pytestmark = pytest.mark.db_test + INPUTS = [Dataset(namespace="database://host:port", name="inputtable")] OUTPUTS = [Dataset(namespace="database://host:port", name="inputtable")] diff --git a/providers/openlineage/tests/unit/openlineage/extractors/test_bash.py b/providers/openlineage/tests/unit/openlineage/extractors/test_bash.py index 31ef2ce80d65d..5e788805cad89 100644 --- a/providers/openlineage/tests/unit/openlineage/extractors/test_bash.py +++ b/providers/openlineage/tests/unit/openlineage/extractors/test_bash.py @@ -21,7 +21,6 @@ from datetime import datetime from unittest.mock import patch -import pytest from openlineage.client.facet_v2 import source_code_job from airflow import DAG @@ -30,8 +29,6 @@ from tests_common.test_utils.compat import BashOperator -pytestmark = pytest.mark.db_test - with DAG( dag_id="test_dummy_dag", description="Test dummy DAG", diff --git a/providers/openlineage/tests/unit/openlineage/extractors/test_manager.py b/providers/openlineage/tests/unit/openlineage/extractors/test_manager.py index 55e11588343d7..100ac520d3d84 100644 --- a/providers/openlineage/tests/unit/openlineage/extractors/test_manager.py +++ b/providers/openlineage/tests/unit/openlineage/extractors/test_manager.py @@ -324,7 +324,6 @@ def get_openlineage_facets_on_start(self): assert metadata.outputs == [] -@pytest.mark.db_test @pytest.mark.skipif( AIRFLOW_V_3_0_PLUS, reason="Test for hook level lineage in Airflow < 3.0", diff --git a/providers/openlineage/tests/unit/openlineage/extractors/test_python.py b/providers/openlineage/tests/unit/openlineage/extractors/test_python.py index 6f3ca48c5187b..abfe10dbe0989 100644 --- a/providers/openlineage/tests/unit/openlineage/extractors/test_python.py +++ b/providers/openlineage/tests/unit/openlineage/extractors/test_python.py @@ -23,7 +23,6 @@ from datetime import datetime from unittest.mock import patch -import pytest from openlineage.client.facet_v2 import source_code_job from airflow import DAG @@ -32,8 +31,6 @@ from tests_common.test_utils.compat import BashOperator, PythonOperator -pytestmark = pytest.mark.db_test - dag = DAG( dag_id="test_dummy_dag", description="Test dummy DAG", diff --git a/providers/openlineage/tests/unit/openlineage/plugins/test_adapter.py b/providers/openlineage/tests/unit/openlineage/plugins/test_adapter.py index f59a9b8d62ce2..29ad2c66e9014 100644 --- a/providers/openlineage/tests/unit/openlineage/plugins/test_adapter.py +++ b/providers/openlineage/tests/unit/openlineage/plugins/test_adapter.py @@ -59,8 +59,6 @@ from tests_common.test_utils.markers import skip_if_force_lowest_dependencies_marker from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS -pytestmark = pytest.mark.db_test - @pytest.mark.parametrize( "env_vars, expected_logging", diff --git a/providers/openlineage/tests/unit/openlineage/plugins/test_execution.py b/providers/openlineage/tests/unit/openlineage/plugins/test_execution.py index ecc5f5cc7c1d4..f07066674550f 100644 --- a/providers/openlineage/tests/unit/openlineage/plugins/test_execution.py +++ b/providers/openlineage/tests/unit/openlineage/plugins/test_execution.py @@ -110,7 +110,6 @@ def setup_job(self, task_name, run_id): return job_runner.task_runner.return_code(timeout=60) - @pytest.mark.db_test @conf_vars({("openlineage", "transport"): f'{{"type": "file", "log_file_path": "{listener_path}"}}'}) def test_not_stalled_task_emits_proper_lineage(self): task_name = "execute_no_stall" @@ -122,7 +121,6 @@ def test_not_stalled_task_emits_proper_lineage(self): assert has_value_in_events(events, ["inputs", "name"], "on-start") assert has_value_in_events(events, ["inputs", "name"], "on-complete") - @pytest.mark.db_test @conf_vars({("openlineage", "transport"): f'{{"type": "file", "log_file_path": "{listener_path}"}}'}) def test_not_stalled_failing_task_emits_proper_lineage(self): task_name = "execute_fail" @@ -139,7 +137,6 @@ def test_not_stalled_failing_task_emits_proper_lineage(self): ("openlineage", "execution_timeout"): "15", } ) - @pytest.mark.db_test def test_short_stalled_task_emits_proper_lineage(self): self.setup_job("execute_short_stall", "test_short_stalled_task_emits_proper_lineage") events = get_sorted_events(tmp_dir) @@ -152,7 +149,6 @@ def test_short_stalled_task_emits_proper_lineage(self): ("openlineage", "execution_timeout"): "3", } ) - @pytest.mark.db_test def test_short_stalled_task_extraction_with_low_execution_is_killed_by_ol_timeout(self): self.setup_job( "execute_short_stall", @@ -163,7 +159,6 @@ def test_short_stalled_task_extraction_with_low_execution_is_killed_by_ol_timeou assert not has_value_in_events(events, ["inputs", "name"], "on-complete") @conf_vars({("openlineage", "transport"): f'{{"type": "file", "log_file_path": "{listener_path}"}}'}) - @pytest.mark.db_test def test_mid_stalled_task_is_killed_by_ol_timeout(self): self.setup_job("execute_mid_stall", "test_mid_stalled_task_is_killed_by_openlineage") events = get_sorted_events(tmp_dir) @@ -177,7 +172,6 @@ def test_mid_stalled_task_is_killed_by_ol_timeout(self): ("core", "task_success_overtime"): "3", } ) - @pytest.mark.db_test def test_success_overtime_kills_tasks(self): # This test checks whether LocalTaskJobRunner kills OL listener which take # longer time than permitted by core.task_success_overtime setting diff --git a/providers/openlineage/tests/unit/openlineage/plugins/test_listener.py b/providers/openlineage/tests/unit/openlineage/plugins/test_listener.py index 931083044c071..956b88e96dde8 100644 --- a/providers/openlineage/tests/unit/openlineage/plugins/test_listener.py +++ b/providers/openlineage/tests/unit/openlineage/plugins/test_listener.py @@ -45,8 +45,6 @@ from tests_common.test_utils.db import clear_db_runs from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS -pytestmark = pytest.mark.db_test - EXPECTED_TRY_NUMBER_1 = 1 TRY_NUMBER_BEFORE_EXECUTION = 0 @@ -757,6 +755,7 @@ def test_listener_on_dag_run_state_changes_configure_process_pool_size( mock_executor.assert_called_once_with(max_workers=expected, initializer=mock.ANY) mock_executor.return_value.submit.assert_called_once() + @pytest.mark.db_test @pytest.mark.parametrize( ("method", "dag_run_state"), [ @@ -1574,6 +1573,7 @@ def test_listener_on_dag_run_state_changes_configure_process_pool_size( mock_executor.assert_called_once_with(max_workers=expected, initializer=mock.ANY) mock_executor.return_value.submit.assert_called_once() + @pytest.mark.db_test @pytest.mark.parametrize( ("method", "dag_run_state"), [ diff --git a/providers/openlineage/tests/unit/openlineage/utils/test_utils.py b/providers/openlineage/tests/unit/openlineage/utils/test_utils.py index 54199f1bfffec..9130098e0bc50 100644 --- a/providers/openlineage/tests/unit/openlineage/utils/test_utils.py +++ b/providers/openlineage/tests/unit/openlineage/utils/test_utils.py @@ -1436,7 +1436,6 @@ def test_dagrun_info_af3(mocked_dag_versions): @pytest.mark.skipif(AIRFLOW_V_3_0_PLUS, reason="Airflow 2 test") -@pytest.mark.db_test def test_dagrun_info_af2(): date = datetime.datetime(2024, 6, 1, tzinfo=datetime.timezone.utc) dag = DAG(