Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround shutdown issue with aiosqlite for now #278

Merged
merged 3 commits into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tests/test_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,16 @@ 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,
rtc_connect_doc_client,
):
Expand All @@ -60,8 +69,11 @@ async def connect(file_format, file_type, file_path):
t1 = time()
assert t1 - t0 < 0.5

await cleanup(jp_serverapp)


async def test_room_sequential_opening(
jp_serverapp,
rtc_create_file,
rtc_connect_doc_client,
):
Expand All @@ -81,3 +93,5 @@ async def connect(file_format, file_type, file_path):
assert dt < 1
dt = await connect(file_format, file_type, file_path)
assert dt < 1

await cleanup(jp_serverapp)
Loading