-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for concurrent room initialization
- Loading branch information
1 parent
3a983e6
commit 9597357
Showing
3 changed files
with
135 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (c) Jupyter Development Team. | ||
# Distributed under the terms of the Modified BSD License. | ||
|
||
from anyio import create_task_group | ||
|
||
|
||
async def test_room_concurrent_initialization( | ||
rtc_create_file, | ||
rtc_connect_doc_client, | ||
): | ||
file_format = "text" | ||
file_type = "file" | ||
file_path = "dummy.txt" | ||
await rtc_create_file(file_path) | ||
|
||
async def connect(file_format, file_type, file_path): | ||
async with await rtc_connect_doc_client(file_format, file_type, file_path) as ws: | ||
pass | ||
|
||
async with create_task_group() as tg: | ||
tg.start_soon(connect, file_format, file_type, file_path) | ||
tg.start_soon(connect, file_format, file_type, file_path) |