Skip to content

Commit

Permalink
Try to delete jupyter_server_fileid early
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Apr 2, 2024
1 parent 3b88868 commit 33f7a1f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tests/test_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ async def test_dirty(
assert not jupyter_ydoc.dirty


async def cleanup(jp_serverapp):
# workaround for a shutdown issue of aiosqlite, see
# https://github.com/jupyterlab/jupyter-collaboration/issues/252
await jp_serverapp.web_app.settings["jupyter_collaboration"].stop_extension()
# workaround `jupyter_server_fileid` manager accessing database on GC
del jp_serverapp.web_app.settings["file_id_manager"]


async def test_room_concurrent_initialization(
jp_serverapp,
rtc_create_file,
Expand All @@ -61,9 +69,7 @@ async def connect(file_format, file_type, file_path):
t1 = time()
assert t1 - t0 < 0.5

# workaround for a shutdown issue of aiosqlite, see
# https://github.com/jupyterlab/jupyter-collaboration/issues/252
await jp_serverapp.web_app.settings["jupyter_collaboration"].stop_extension()
await cleanup(jp_serverapp)


async def test_room_sequential_opening(
Expand All @@ -88,6 +94,4 @@ async def connect(file_format, file_type, file_path):
dt = await connect(file_format, file_type, file_path)
assert dt < 1

# workaround for a shutdown issue of aiosqlite, see
# https://github.com/jupyterlab/jupyter-collaboration/issues/252
await jp_serverapp.web_app.settings["jupyter_collaboration"].stop_extension()
await cleanup(jp_serverapp)

0 comments on commit 33f7a1f

Please sign in to comment.