Skip to content

Commit 8ee69a5

Browse files
committed
set fsync=off on tests
1 parent c67737c commit 8ee69a5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/pytest-simcore/src/pytest_simcore/docker_compose.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# pylint: disable=unused-argument
33
# pylint: disable=unused-variable
44

5-
""" Fixtures to create docker-compose.yaml configuration files (as in Makefile)
5+
"""Fixtures to create docker-compose.yaml configuration files (as in Makefile)
66
7-
- Basically runs `docker compose config
8-
- Services in stack can be selected using 'core_services_selection', 'ops_services_selection' fixtures
7+
- Basically runs `docker compose config
8+
- Services in stack can be selected using 'core_services_selection', 'ops_services_selection' fixtures
99
1010
"""
1111

@@ -391,6 +391,10 @@ def _filter_services_and_dump(
391391
if "environment" in service:
392392
service["environment"] = _minio_fix(service["environment"])
393393

394+
if name == "postgres":
395+
# NOTE: # -c fsync=off is not recommended for production as this disable writing to disk https://pythonspeed.com/articles/faster-db-tests/
396+
service["command"] += ["-c", "fsync=off"]
397+
394398
# updates current docker-compose (also versioned ... do not change by hand)
395399
with docker_compose_path.open("wt") as fh:
396400
yaml.dump(content, fh, default_flow_style=False)

0 commit comments

Comments
 (0)