Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from wsrpc/fix-frames-order
Use lock to keep correct frames order
- Loading branch information
Showing
2 changed files
with
19 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import asyncio | ||
|
||
from wsrpc_aiohttp import WSRPCClient | ||
|
||
|
||
async def test_frames_are_sent_in_correct_order(client: WSRPCClient): | ||
async with client: | ||
data = 'hello, world' * 1024 | ||
coros = [ | ||
client.call("ping", data=data) | ||
for _ in range(100) | ||
] | ||
await asyncio.gather(*coros) |
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