@@ -50,6 +50,7 @@ def seq_local_http(self):
5050 def run ():
5151 resp = client .get (self .local_url , verify = False )
5252 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
53+ self .validate_response_body (self .local_url , resp .text )
5354
5455 return self .run_sequential_benchmark ("httpmorph_seq_local_http" , run )
5556
@@ -59,6 +60,7 @@ def seq_remote_http(self):
5960 def run ():
6061 resp = client .get (self .remote_http_url , verify = False , timeout = 10 )
6162 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
63+ self .validate_response_body (self .remote_http_url , resp .text )
6264
6365 return self .run_sequential_benchmark ("httpmorph_seq_remote_http" , run )
6466
@@ -68,6 +70,7 @@ def seq_remote_https(self):
6870 def run ():
6971 resp = client .get (self .remote_https_url , verify = False , timeout = 10 )
7072 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
73+ self .validate_response_body (self .remote_https_url , resp .text )
7174
7275 return self .run_sequential_benchmark ("httpmorph_seq_remote_https" , run )
7376
@@ -81,6 +84,7 @@ def seq_remote_http2(self):
8184 def run ():
8285 resp = client .get (self .http2_url , verify = False , timeout = 10 )
8386 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
87+ self .validate_response_body (self .http2_url , resp .text )
8488
8589 return self .run_sequential_benchmark ("httpmorph_seq_remote_http2" , run )
8690
@@ -95,6 +99,7 @@ def run():
9599 self .proxy_target_http , proxy = self .proxy_url_http , verify = False , timeout = 10
96100 )
97101 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
102+ self .validate_response_body (self .proxy_target_http , resp .text )
98103 except Exception :
99104 # Proxy can be slow, accept timeout as valid
100105 pass
@@ -121,6 +126,7 @@ def run():
121126 self .proxy_target_https , proxy = self .proxy_url_https , verify = False , timeout = 10
122127 )
123128 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
129+ self .validate_response_body (self .proxy_target_https , resp .text )
124130 except Exception :
125131 # Proxy can be slow, accept timeout as valid
126132 pass
@@ -149,6 +155,7 @@ def run():
149155 self .proxy_target_https , proxy = self .proxy_url_https , verify = False , timeout = 10
150156 )
151157 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
158+ self .validate_response_body (self .proxy_target_https , resp .text )
152159 except Exception :
153160 pass
154161
@@ -170,6 +177,7 @@ def conc_local_http(self):
170177 def run ():
171178 resp = client .get (self .local_url , verify = False )
172179 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
180+ self .validate_response_body (self .local_url , resp .text )
173181
174182 return self .run_concurrent_sync (run )
175183
@@ -179,6 +187,7 @@ def conc_remote_http(self):
179187 def run ():
180188 resp = client .get (self .remote_http_url , verify = False , timeout = 10 )
181189 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
190+ self .validate_response_body (self .remote_http_url , resp .text )
182191
183192 return self .run_concurrent_sync (run )
184193
@@ -188,6 +197,7 @@ def conc_remote_https(self):
188197 def run ():
189198 resp = client .get (self .remote_https_url , verify = False , timeout = 10 )
190199 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
200+ self .validate_response_body (self .remote_https_url , resp .text )
191201
192202 return self .run_concurrent_sync (run )
193203
@@ -200,6 +210,7 @@ def conc_remote_http2(self):
200210 def run ():
201211 resp = client .get (self .http2_url , verify = False , timeout = 10 )
202212 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
213+ self .validate_response_body (self .http2_url , resp .text )
203214
204215 return self .run_concurrent_sync (run )
205216
@@ -214,6 +225,7 @@ def run():
214225 self .proxy_target_http , proxy = self .proxy_url_http , verify = False , timeout = 10
215226 )
216227 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
228+ self .validate_response_body (self .proxy_target_http , resp .text )
217229 except Exception :
218230 # Proxy can be slow or rate-limit concurrent connections, accept timeout as valid
219231 pass
@@ -235,6 +247,7 @@ def run():
235247 self .proxy_target_https , proxy = self .proxy_url_https , verify = False , timeout = 10
236248 )
237249 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
250+ self .validate_response_body (self .proxy_target_https , resp .text )
238251 except Exception :
239252 # Proxy can be slow or rate-limit concurrent connections, accept timeout as valid
240253 pass
@@ -259,6 +272,7 @@ def run():
259272 self .proxy_target_https , proxy = self .proxy_url_https , verify = False , timeout = 10
260273 )
261274 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
275+ self .validate_response_body (self .proxy_target_https , resp .text )
262276 except Exception :
263277 # HTTP/2 over proxy can be slow, accept timeout as valid
264278 pass
@@ -280,6 +294,7 @@ async def run_batch():
280294 async def request ():
281295 resp = await client .get (self .local_url , timeout = 10 )
282296 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
297+ self .validate_response_body (self .local_url , resp .text )
283298
284299 return await self .run_concurrent_async (request )
285300
@@ -298,6 +313,7 @@ async def run_batch():
298313 async def request ():
299314 resp = await client .get (self .remote_http_url , verify = False , timeout = 10 )
300315 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
316+ self .validate_response_body (self .remote_http_url , resp .text )
301317
302318 return await self .run_concurrent_async (request )
303319
@@ -316,6 +332,7 @@ async def run_batch():
316332 async def request ():
317333 resp = await client .get (self .remote_https_url , verify = False , timeout = 10 )
318334 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
335+ self .validate_response_body (self .remote_https_url , resp .text )
319336
320337 return await self .run_concurrent_async (request )
321338
@@ -336,6 +353,7 @@ async def run_batch():
336353 async def request ():
337354 resp = await client .get (self .http2_url , verify = False , timeout = 10 )
338355 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
356+ self .validate_response_body (self .http2_url , resp .text )
339357
340358 return await self .run_concurrent_async (request )
341359
@@ -362,6 +380,7 @@ async def request():
362380 timeout = 10 ,
363381 )
364382 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
383+ self .validate_response_body (self .proxy_target_http , resp .text )
365384 except Exception :
366385 # Proxy can be slow, accept timeout as valid
367386 pass
@@ -392,6 +411,7 @@ async def request():
392411 timeout = 10 ,
393412 )
394413 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
414+ self .validate_response_body (self .proxy_target_https , resp .text )
395415 except Exception :
396416 # Proxy can be slow, accept timeout as valid
397417 pass
@@ -424,6 +444,7 @@ async def request():
424444 timeout = 10 ,
425445 )
426446 assert 200 <= resp .status_code < 600 , f"Got status { resp .status_code } "
447+ self .validate_response_body (self .proxy_target_https , resp .text )
427448 except Exception :
428449 # HTTP/2 over proxy can be slow, accept timeout as valid
429450 pass
0 commit comments