tests/http: do not save files for downloads in scorecard testing
Closes #10788
This commit is contained in:
parent
138860576f
commit
b00289843a
@ -72,7 +72,7 @@ class ScoreCard:
|
|||||||
self.info('.')
|
self.info('.')
|
||||||
curl = CurlClient(env=self.env)
|
curl = CurlClient(env=self.env)
|
||||||
url = f'https://{authority}/'
|
url = f'https://{authority}/'
|
||||||
r = curl.http_download(urls=[url], alpn_proto=proto)
|
r = curl.http_download(urls=[url], alpn_proto=proto, no_save=True)
|
||||||
if r.exit_code == 0 and len(r.stats) == 1:
|
if r.exit_code == 0 and len(r.stats) == 1:
|
||||||
c_samples.append(r.stats[0]['time_connect'])
|
c_samples.append(r.stats[0]['time_connect'])
|
||||||
hs_samples.append(r.stats[0]['time_appconnect'])
|
hs_samples.append(r.stats[0]['time_appconnect'])
|
||||||
@ -141,7 +141,7 @@ class ScoreCard:
|
|||||||
self.info(f'{sample_size}x single')
|
self.info(f'{sample_size}x single')
|
||||||
for i in range(sample_size):
|
for i in range(sample_size):
|
||||||
curl = CurlClient(env=self.env)
|
curl = CurlClient(env=self.env)
|
||||||
r = curl.http_download(urls=[url], alpn_proto=proto)
|
r = curl.http_download(urls=[url], alpn_proto=proto, no_save=True)
|
||||||
err = self._check_downloads(r, count)
|
err = self._check_downloads(r, count)
|
||||||
if err:
|
if err:
|
||||||
errors.append(err)
|
errors.append(err)
|
||||||
@ -163,7 +163,7 @@ class ScoreCard:
|
|||||||
self.info(f'{sample_size}x{count} serial')
|
self.info(f'{sample_size}x{count} serial')
|
||||||
for i in range(sample_size):
|
for i in range(sample_size):
|
||||||
curl = CurlClient(env=self.env)
|
curl = CurlClient(env=self.env)
|
||||||
r = curl.http_download(urls=[url], alpn_proto=proto)
|
r = curl.http_download(urls=[url], alpn_proto=proto, no_save=True)
|
||||||
self.info(f'.')
|
self.info(f'.')
|
||||||
err = self._check_downloads(r, count)
|
err = self._check_downloads(r, count)
|
||||||
if err:
|
if err:
|
||||||
@ -187,7 +187,7 @@ class ScoreCard:
|
|||||||
for i in range(sample_size):
|
for i in range(sample_size):
|
||||||
curl = CurlClient(env=self.env)
|
curl = CurlClient(env=self.env)
|
||||||
start = datetime.now()
|
start = datetime.now()
|
||||||
r = curl.http_download(urls=[url], alpn_proto=proto,
|
r = curl.http_download(urls=[url], alpn_proto=proto, no_save=True,
|
||||||
extra_args=['--parallel'])
|
extra_args=['--parallel'])
|
||||||
err = self._check_downloads(r, count)
|
err = self._check_downloads(r, count)
|
||||||
if err:
|
if err:
|
||||||
|
|||||||
@ -235,12 +235,18 @@ class CurlClient:
|
|||||||
alpn_proto: Optional[str] = None,
|
alpn_proto: Optional[str] = None,
|
||||||
with_stats: bool = True,
|
with_stats: bool = True,
|
||||||
with_headers: bool = False,
|
with_headers: bool = False,
|
||||||
|
no_save: bool = False,
|
||||||
extra_args: List[str] = None):
|
extra_args: List[str] = None):
|
||||||
if extra_args is None:
|
if extra_args is None:
|
||||||
extra_args = []
|
extra_args = []
|
||||||
extra_args.extend([
|
if no_save:
|
||||||
'-o', 'download_#1.data',
|
extra_args.extend([
|
||||||
])
|
'-o', '/dev/null',
|
||||||
|
])
|
||||||
|
else:
|
||||||
|
extra_args.extend([
|
||||||
|
'-o', 'download_#1.data',
|
||||||
|
])
|
||||||
# remove any existing ones
|
# remove any existing ones
|
||||||
for i in range(100):
|
for i in range(100):
|
||||||
self._rmf(self.download_file(i))
|
self._rmf(self.download_file(i))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user