Commit 428c0861 authored by Felipe Andrade's avatar Felipe Andrade

fix test

parent 42d02baf
...@@ -12,7 +12,6 @@ import ( ...@@ -12,7 +12,6 @@ import (
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/syndtr/goleveldb/leveldb/opt"
) )
// TestConcurrentWSPanic tests for a panic in the websocket proxy // TestConcurrentWSPanic tests for a panic in the websocket proxy
...@@ -306,7 +305,8 @@ func TestWSClientExceedReadLimit(t *testing.T) { ...@@ -306,7 +305,8 @@ func TestWSClientExceedReadLimit(t *testing.T) {
t.Fatalf("backend should not get the large message") t.Fatalf("backend should not get the large message")
}) })
clientReq := "{\"id\": 1, \"method\": \"eth_subscribe\", \"params\": [\"" + strings.Repeat("barf", 256*opt.KiB+1) + "\"]}" payload := strings.Repeat("barf", 1024*1024)
clientReq := "{\"id\": 1, \"method\": \"eth_subscribe\", \"params\": [\"" + payload + "\"]}"
err = client.WriteMessage( err = client.WriteMessage(
websocket.TextMessage, websocket.TextMessage,
[]byte(clientReq), []byte(clientReq),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment