File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ final class HTTPTests: XCTestCase {
145145
146146 func testServerGetBlob( ) async throws {
147147 let port = UInt16 . random ( in: 8080 ..< 9000 )
148- let blob = Data ( repeating: . random( in: . min ... . max) , count: 1024 * 1024 * 2 )
148+ let blob = Data ( repeating: . random( in: . min ... . max) , count: 1024 * . random ( in : 1 ... 10 ) )
149149 var server : HTTPServer ? = try await HTTPServer ( configuration: . init( port: port) , response: { ( address, request) in
150150 if request. uri == " /blob " , request. method == . get {
151151 return request. body. isEmpty ? . init( code: . ok, body: blob) : . init( code: . badRequest)
@@ -168,7 +168,7 @@ final class HTTPTests: XCTestCase {
168168
169169 func testServerPostBlob( ) async throws {
170170 let port = UInt16 . random ( in: 8080 ..< 9000 )
171- let blob = Data ( repeating: . random( in: . min ... . max) , count: 1024 * . random( in: 100 ..< 512 ) )
171+ let blob = Data ( repeating: . random( in: . min ... . max) , count: 1024 * . random( in: 1 ... 10 ) )
172172 var server : HTTPServer ? = try await HTTPServer ( configuration: . init( port: port) , response: { ( address, request) in
173173 if request. uri == " /blob " , request. method == . post {
174174 XCTAssertEqual ( request. headers [ . contentLength] , blob. count. description)
You can’t perform that action at this time.
0 commit comments