sjyangkevin commented on issue #52020: URL: https://github.com/apache/airflow/issues/52020#issuecomment-2994378535
> I will have a look at Weaviate For Weaviate, three test cases are decorated with `@pytest.mark.db_test`. * `tests/unit/weaviate/operators/test_weaviate.py::TestWeaviateIngestOperator::test_partial_batch_hook_params` * `tests/unit/weaviate/operators/test_weaviate.py::TestWeaviateDocumentIngestOperator::test_partial_hook_params` * `tests/unit/weaviate/operators/test_weaviate.py::TestWeaviateIngestOperator::test_templates` After removing the marks, all three tests reported FAILED/ERROR as shown in the short summary below. I think no change is needed for Weaviate. * Two test cases invoke `dag_maker` * One test case invoke `create_task_instance_of_operator` * No test case accessing DB only for testing connection. ``` ERROR tests/unit/weaviate/operators/test_weaviate.py::TestWeaviateIngestOperator::test_partial_batch_hook_params - airflow.exceptions.AirflowInternalRuntimeError: Your test accessed the DB but `_AIRFLOW_SKIP_DB_TESTS` is set. Either make sure your test does not use database or mark the test with `@pytest.mark.db_test` See https://github.com/apache/airflow/blob/main/contributing-docs/testing/unit_tests.rst#best-practices-for-db-tests on how to deal with it and consult examples. ERROR tests/unit/weaviate/operators/test_weaviate.py::TestWeaviateDocumentIngestOperator::test_partial_hook_params - airflow.exceptions.AirflowInternalRuntimeError: Your test accessed the DB but `_AIRFLOW_SKIP_DB_TESTS` is set. Either make sure your test does not use database or mark the test with `@pytest.mark.db_test` See https://github.com/apache/airflow/blob/main/contributing-docs/testing/unit_tests.rst#best-practices-for-db-tests on how to deal with it and consult examples. FAILED tests/unit/weaviate/operators/test_weaviate.py::TestWeaviateIngestOperator::test_templates - airflow.exceptions.AirflowInternalRuntimeError: Your test accessed the DB but `_AIRFLOW_SKIP_DB_TESTS` is set. Either make sure your test does not use database or mark the test with `@pytest.mark.db_test` See https://github.com/apache/airflow/blob/main/contributing-docs/testing/unit_tests.rst#best-practices-for-db-tests on how to deal with it and consult examples. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
