protocol/rtsp: for test, read buf size is now const called max reequest size

This commit is contained in:
Saxon 2019-04-29 13:11:27 +09:30
parent 66bc6bbe33
commit a783b2052e
1 changed files with 4 additions and 1 deletions

View File

@ -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: