@@ -1679,18 +1679,19 @@ abstract class HttpServerTest<SERVER> extends WithHttpServer<SERVER> {
16791679 assumeTrue(testBodyFilesContent())
16801680 def maxContentBytes = 4096
16811681 def body = new MultipartBody.Builder ()
1682- .setType(MultipartBody . FORM )
1683- .addFormDataPart(' file' , ' large.bin' ,
1684- RequestBody . create(MediaType . parse(' application/octet-stream' ), ' X' * (maxContentBytes + 500 )))
1685- .build()
1682+ .setType(MultipartBody . FORM )
1683+ .addFormDataPart(' file' , ' large.bin' ,
1684+ RequestBody . create(MediaType . parse(' application/octet-stream' ), ' X' * (maxContentBytes + 500 )))
1685+ .build()
16861686 def httpRequest = request(BODY_MULTIPART , ' POST' , body). build()
16871687 def response = client. newCall(httpRequest). execute()
16881688
16891689 when :
16901690 TEST_WRITER . waitForTraces(1 )
16911691
16921692 then :
1693- TEST_WRITER . get(0 ). any { span ->
1693+ TEST_WRITER . get(0 ). any {
1694+ span ->
16941695 span. getTag(' request.body.files_content' ) == ' [' + ' X' * maxContentBytes + ' ]'
16951696 }
16961697
@@ -1703,9 +1704,10 @@ abstract class HttpServerTest<SERVER> extends WithHttpServer<SERVER> {
17031704 assumeTrue(testBodyFilesContent())
17041705 def maxFilesToInspect = 25
17051706 def bodyBuilder = new MultipartBody.Builder (). setType(MultipartBody . FORM )
1706- (1 .. maxFilesToInspect + 1 ). each { i ->
1707+ (1 .. maxFilesToInspect + 1 ). each {
1708+ i ->
17071709 bodyBuilder. addFormDataPart(" file$i " , " file${ i} .bin" ,
1708- RequestBody . create(MediaType . parse(' application/octet-stream' ), " content_of_file_$i " ))
1710+ RequestBody . create(MediaType . parse(' application/octet-stream' ), " content_of_file_$i " ))
17091711 }
17101712 def httpRequest = request(BODY_MULTIPART , ' POST' , bodyBuilder. build()). build()
17111713 def response = client. newCall(httpRequest). execute()
@@ -1714,10 +1716,11 @@ abstract class HttpServerTest<SERVER> extends WithHttpServer<SERVER> {
17141716 TEST_WRITER . waitForTraces(1 )
17151717
17161718 then :
1717- TEST_WRITER . get(0 ). any { span ->
1719+ TEST_WRITER . get(0 ). any {
1720+ span ->
17181721 def tag = span. getTag(' request.body.files_content' ) as String
17191722 tag?. contains(" content_of_file_$maxFilesToInspect " ) &&
1720- ! tag. contains(" content_of_file_${ maxFilesToInspect + 1} " )
1723+ ! tag. contains(" content_of_file_${ maxFilesToInspect + 1} " )
17211724 }
17221725
17231726 cleanup :
0 commit comments