Taragolis commented on code in PR #37166:
URL: https://github.com/apache/airflow/pull/37166#discussion_r1544845557
##########
tests/providers/common/io/xcom/test_backend.py:
##########
@@ -86,28 +87,19 @@ def task_instance(task_instance_factory):
class TestXcomObjectStoreBackend:
- path = "file:/tmp/xcom"
-
- def setup_method(self):
- try:
- conf.add_section("common.io")
- except DuplicateSectionError:
- pass
- conf.set("core", "xcom_backend",
"airflow.providers.common.io.xcom.backend.XComObjectStoreBackend")
- conf.set("common.io", "xcom_objectstore_path", self.path)
- conf.set("common.io", "xcom_objectstore_threshold", "50")
- settings.configure_vars()
-
- def teardown_method(self):
- conf.remove_option("core", "xcom_backend")
- conf.remove_option("common.io", "xcom_objectstore_path")
- conf.remove_option("common.io", "xcom_objectstore_threshold")
- settings.configure_vars()
- p = ObjectStoragePath(self.path)
- if p.exists():
- p.rmdir(recursive=True)
-
- @pytest.mark.db_test
+ @pytest.fixture(autouse=True)
+ def setup_test_cases(self, tmp_path):
+ xcom_path = tmp_path / "xcom"
+ xcom_path.mkdir()
+ self.path = f"file:{xcom_path}"
Review Comment:
More common URI `file:///foo/bar` seems like now worked fine
--
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]