From 8322607fd2e4ea50b1340742a7291b639b599e25 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 12 May 2021 18:20:48 +0300 Subject: [PATCH] rpc/server: silence deadcode warning --- pkg/rpc/server/subscription_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/rpc/server/subscription_test.go b/pkg/rpc/server/subscription_test.go index 58f4dc6d3..7f8872eed 100644 --- a/pkg/rpc/server/subscription_test.go +++ b/pkg/rpc/server/subscription_test.go @@ -16,6 +16,8 @@ import ( "go.uber.org/atomic" ) +const testOverflow = false + func wsReader(t *testing.T, ws *websocket.Conn, msgCh chan<- []byte, isFinished *atomic.Bool) { for { ws.SetReadDeadline(time.Now().Add(time.Second)) @@ -428,7 +430,10 @@ func TestWSClientsLimit(t *testing.T) { // that's going to happen because of network-level buffering, typical // number seen in tests is around ~3500 events, but it's not reliable enough, // thus this test is disabled. -func testSubscriptionOverflow(t *testing.T) { +func TestSubscriptionOverflow(t *testing.T) { + if !testOverflow { + return + } const blockCnt = notificationBufSize * 5 var receivedMiss bool