Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

ci: speed up integration database cleanup with tmpfs (#42558)

Stephen Zhou6bb5e525d36d
diff --git a/api/tests/test_containers_integration_tests/conftest.py b/api/tests/test_containers_integration_tests/conftest.py
index 02e6e7927d8..7b588b7fa00 100644
--- a/api/tests/test_containers_integration_tests/conftest.py
+++ b/api/tests/test_containers_integration_tests/conftest.py
@@ -102,6 +102,9 @@ class DifyTestContainers:
logger.info("Initializing PostgreSQL container...")
self.postgres = PostgresContainer(
image="postgres:14-alpine",
+ # This per-worker database is discarded after the session. Keep its
+ # data in bounded tmpfs to reduce I/O from full-schema TRUNCATE cleanup.
+ tmpfs={"/var/lib/postgresql/data": "rw,size=2g"},
).with_network(self.network)
self.postgres.waiting_for(_wait_for_log_message("is ready to accept connections", 30))
self.postgres.start()