Skip to content

Commit dd71251

Browse files
committed
Use distinct named memory databases instead of on-disk.
1 parent 3174de9 commit dd71251

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tiled/_tests/test_sync.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22
import contextlib
3+
import itertools
34
import tempfile
4-
from pathlib import Path
55

66
import awkward
77
import h5py
@@ -11,7 +11,7 @@
1111
import sparse
1212
import tifffile
1313

14-
from tiled.catalog import from_uri
14+
from tiled.catalog import in_memory
1515
from tiled.client import Context, from_context
1616
from tiled.client.register import register
1717
from tiled.client.smoke import read
@@ -20,15 +20,16 @@
2020
from tiled.queries import Key
2121
from tiled.server.app import build_app
2222

23+
unique_database_num = itertools.count(1)
24+
2325

2426
@contextlib.contextmanager
2527
def client_factory(readable_storage=None):
2628
with tempfile.TemporaryDirectory() as tempdir:
27-
catalog = from_uri(
28-
Path(tempdir, "catalog.db"),
29+
catalog = in_memory(
30+
named_memory=f"database{next(unique_database_num)}",
2931
writable_storage=str(tempdir),
3032
readable_storage=readable_storage,
31-
init_if_not_exists=True,
3233
)
3334
app = build_app(catalog)
3435
with Context.from_app(app) as context:

0 commit comments

Comments
 (0)