Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
joente committed Jan 10, 2025
1 parent 04abbc1 commit b01a6d1
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions itest/test_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,27 @@
async def test_err_max_size():
client = Client()

prev = protocol.WEBSOCKET_MAX_SIZE

# We decrease the max_size so the following query will fail
protocol.WEBSOCKET_MAX_SIZE = 2**14

await client.connect('ws://localhost:9780')
try:
await client.authenticate('admin', 'pass')

# This is large enough so it will fail
n = 20_000
await client.query("""//ti
range(n).map(|i| `this is item with number {i}`);
""", timeout=5, n=n)

await client.connect('ws://localhost:9780')
try:
await client.authenticate('admin', 'pass')

# This is large enough so it will fail
n = 20_000
await client.query("""//ti
range(n).map(|i| `this is item with number {i}`);
""", timeout=5, n=n)

finally:
await client.close_and_wait()
finally:
await client.close_and_wait()
# Restore original value
protocol.WEBSOCKET_MAX_SIZE = prev



class TestWS(TestBase):
Expand Down

0 comments on commit b01a6d1

Please sign in to comment.