go-ethereum/rpc
Daniel Liu ce26c34c7b
rpc: refactor read limit test #32494 (#1412)
closes #32240 #32232

The main cause for the time out is the slow json encoding of large data.
In #32240 they tried to resolve the issue by reducing the size of the
test. However as Felix pointed out, the test is still kind of confusing.

I've refactored the test so it is more understandable and have reduced
the amount of data needed to be json encoded. I think it is still
important to ensure that the default read limit is not active, so I have
retained one large (~32 MB) test case, but it's at least smaller than
the existing ~64 MB test case.

Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
2025-09-03 15:44:04 +08:00
..
testdata rpc: add limit for batch request and response size #26681 (#998) 2025-04-28 17:00:30 +08:00
client.go internal: remove unused shh and swarm modules from console #32073 (#1407) 2025-09-03 15:40:28 +08:00
client_example_test.go upgrade the websocket in xdpos (#349) 2023-11-06 15:37:14 +11:00
client_opt.go eth, rpc: add configurable option for wsMessageSizeLimit #27801 (#1003) 2025-04-28 18:02:12 +08:00
client_opt_test.go node, rpc: add JWT auth support in client #24911 2025-04-28 10:25:07 +08:00
client_test.go rpc: run tests in parallel #30384 (#1021) 2025-05-06 09:41:42 +08:00
context_headers.go rpc: support injecting HTTP headers through context #26023 (#977) 2025-04-24 19:08:16 +08:00
doc.go all: update dead wiki links #32215 (#1409) 2025-09-03 15:41:48 +08:00
endpoints.go console: handle eth.coinbase throws #19374 (#953) 2025-04-24 18:11:48 +08:00
errors.go rpc: add method to test for subscription support #25942 (#999) 2025-04-28 17:46:24 +08:00
handler.go rpc: add method name length limit #31711 (#1406) 2025-09-03 15:39:40 +08:00
http.go rpc: fix leak by close http body #29223 (#1013) 2025-04-29 17:10:12 +08:00
http_test.go rpc: run tests in parallel #30384 (#1021) 2025-05-06 09:41:42 +08:00
inproc.go rpc: add limit for batch request and response size #26681 (#998) 2025-04-28 17:00:30 +08:00
ipc.go rpc: add limit for batch request and response size #26681 (#998) 2025-04-28 17:00:30 +08:00
ipc_js.go upgrade the websocket in xdpos (#349) 2023-11-06 15:37:14 +11:00
ipc_unix.go rpc: fix ipc max path size #29385 (#1014) 2025-04-29 17:11:33 +08:00
ipc_wasip1.go all: add build tags for wasip1 (#31090) 2025-03-19 18:02:46 +08:00
ipc_windows.go rpc: use go-winio for named pipes #27972 (#1002) 2025-04-28 17:50:26 +08:00
json.go rpc: add method name length limit #31711 (#1406) 2025-09-03 15:39:40 +08:00
metrics.go rpc: fix ns/µs mismatch in metrics (#28649) 2024-12-13 14:00:13 +08:00
server.go rpc: add SetWebsocketReadLimit in Server #32279 (#1411) 2025-09-03 15:43:14 +08:00
server_test.go rpc: add SetWebsocketReadLimit in Server #32279 (#1411) 2025-09-03 15:43:14 +08:00
service.go rpc: use reflect.TypeFor #32316 (#1410) 2025-09-03 15:42:31 +08:00
stdio.go rpc: add limit for batch request and response size #26681 (#998) 2025-04-28 17:00:30 +08:00
subscription.go rpc: remove deprecated method Notifier.Closed #29162 (#1022) 2025-05-06 09:44:20 +08:00
subscription_test.go internal: remove unused shh and swarm modules from console #32073 (#1407) 2025-09-03 15:40:28 +08:00
testservice_test.go rpc: remove deprecated method Notifier.Closed #29162 (#1022) 2025-05-06 09:44:20 +08:00
types.go refactor: Removed IsValidHexString and make has0xPrefix as public as per review comment 2025-05-16 12:33:25 +04:00
types_test.go test: Updated test cases to include MaxInt64, MinInt64 and MaxUint64, also rename testcase to TestHas0xPrefix to cover Has0xPrefix public method in hexutil package 2025-05-16 12:55:45 +04:00
websocket.go rpc: add SetWebsocketReadLimit in Server #32279 (#1411) 2025-09-03 15:43:14 +08:00
websocket_test.go rpc: refactor read limit test #32494 (#1412) 2025-09-03 15:44:04 +08:00