Skip to content

Commit

Permalink
ci: Use tmpfs to speed up database container initialization in tests (#…
Browse files Browse the repository at this point in the history
…2021)

Backported-from: main (24.09)
Backported-to: 23.09
  • Loading branch information
achimnol committed Apr 13, 2024
1 parent fe1428c commit b12a789
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ai/backend/testutils/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ def etcd_container() -> Iterator[tuple[str, HostPortPair]]:
"docker",
"run",
"-d",
"--tmpfs",
"/etcd-data",
"--name",
f"test--etcd-slot-{get_parallel_slot()}-{random_id}",
"-p",
Expand Down Expand Up @@ -149,6 +151,8 @@ def redis_container() -> Iterator[tuple[str, HostPortPair]]:
"docker",
"run",
"-d",
"--tmpfs",
"/data",
"-u",
f"{os.getuid()}:{os.getgid()}",
"--name",
Expand Down Expand Up @@ -203,6 +207,8 @@ def postgres_container() -> Iterator[tuple[str, HostPortPair]]:
"docker",
"run",
"-d",
"--tmpfs",
"/var/lib/postgresql/data",
"--name",
f"test--postgres-slot-{get_parallel_slot()}-{random_id}",
"-p",
Expand Down

0 comments on commit b12a789

Please sign in to comment.