mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
rpc: fixed logic for test to handle cases when imput exceeds wsDefaultReadLimit
Signed-off-by: arnabnandikgp <arnabnandi2002@gmail.com>
This commit is contained in:
parent
f17df6db91
commit
99b14dd00c
1 changed files with 3 additions and 2 deletions
|
|
@ -142,8 +142,8 @@ func TestWebsocketLargeRead(t *testing.T) {
|
|||
// Remove some bytes for json encoding overhead.
|
||||
underLimit := int(expLimit - 128)
|
||||
overLimit := expLimit + 1
|
||||
if expLimit == wsDefaultReadLimit {
|
||||
// No point trying the full 32MB in tests. Just sanity-check that
|
||||
if expLimit >= wsDefaultReadLimit {
|
||||
// No point trying the full 32MB or more in the tests. Just sanity-check that
|
||||
// it's not obviously limited.
|
||||
underLimit = 1024
|
||||
overLimit = -1
|
||||
|
|
@ -170,6 +170,7 @@ func TestWebsocketLargeRead(t *testing.T) {
|
|||
testLimit(ptr(0)) // Should be ignored (use default)
|
||||
testLimit(nil) // Should be ignored (use default)
|
||||
testLimit(ptr(200))
|
||||
testLimit(ptr(wsDefaultReadLimit))
|
||||
testLimit(ptr(wsDefaultReadLimit * 2))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue