Skip to content

Commit 9baae32

Browse files
committed
Changes from comments on PR #3492:
- Also inherit from ``Web3ValueError`` for ``ReadBufferLimitReached``. - Properly assert the response for configured read limit test.
1 parent 7490fe3 commit 9baae32

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tests/core/providers/test_async_ipc_provider.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,4 +337,8 @@ async def test_async_ipc_read_buffer_limit_is_configurable(
337337
pathlib.Path(jsonrpc_ipc_pipe_path), read_buffer_limit=TWENTY_MB + 1024
338338
)
339339
) as w3:
340-
await w3.provider.make_request("method", [])
340+
response = await w3.provider.make_request("method", [])
341+
assert (
342+
len(response["result"])
343+
== TWENTY_MB - len(SIZED_MSG_START) - len(SIZED_MSG_END) + 1024
344+
)

web3/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ class PersistentConnectionError(Web3Exception):
340340
"""
341341

342342

343-
class ReadBufferLimitReached(PersistentConnectionError):
343+
class ReadBufferLimitReached(PersistentConnectionError, Web3ValueError):
344344
"""
345345
Raised when the read buffer limit is reached while reading data from a persistent
346346
connection.

0 commit comments

Comments
 (0)