From a783b2052ee9884944cd7866b27599e7bd99ec13 Mon Sep 17 00:00:00 2001 From: Saxon Date: Mon, 29 Apr 2019 13:11:27 +0930 Subject: [PATCH] protocol/rtsp: for test, read buf size is now const called max reequest size --- protocol/rtsp/rtsp_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/protocol/rtsp/rtsp_test.go b/protocol/rtsp/rtsp_test.go index 5fd9a212..744d67c8 100644 --- a/protocol/rtsp/rtsp_test.go +++ b/protocol/rtsp/rtsp_test.go @@ -38,6 +38,9 @@ import ( "unicode" ) +// The max request size we should get in bytes. +const maxRequest = 1024 + // TestMethods checks that we can correctly form requests for each of the RTSP // methods supported in the rtsp pkg. This test also checks that communication // over a TCP connection is performed correctly. @@ -166,7 +169,7 @@ func TestMethods(t *testing.T) { serverErr <- errors.New(fmt.Sprintf("server could not accept connection, error: %v", err)) } - buf := make([]byte, 1024) + buf := make([]byte, maxRequest) var n int for i, test := range tests { loop: