mirror of
https://github.com/valitydev/yandex-tank.git
synced 2024-11-06 10:25:17 +00:00
parent
76a3084f12
commit
3b24d0abcd
@ -249,6 +249,9 @@ class UriReader(object):
|
||||
headers=self.headers,
|
||||
http_ver=self.http_ver,
|
||||
).to_s(), marker)
|
||||
if info.status.ammo_count == 0:
|
||||
self.log.error("No ammo in uri-style file")
|
||||
raise AmmoFileError("No ammo! Cover me!")
|
||||
ammo_file.seek(0)
|
||||
info.status.af_position = 0
|
||||
info.status.inc_loop_count()
|
||||
|
@ -147,12 +147,12 @@ class StepperTestCase(TankTestCase):
|
||||
from Tank.stepper.module_exceptions import AmmoFileError
|
||||
temp_stpd = tempfile.mkstemp()[1]
|
||||
with open(temp_stpd, 'w') as stpd_file:
|
||||
Stepper(
|
||||
rps_schedule=[],
|
||||
instances_schedule=[],
|
||||
loop_limit=-1,
|
||||
ammo_limit=10,
|
||||
headers=[],
|
||||
ammo_file="data/empty.uri",
|
||||
).write(stpd_file)
|
||||
self.assertRaises(AmmoFileError)
|
||||
with self.assertRaises(AmmoFileError):
|
||||
Stepper(
|
||||
rps_schedule=[],
|
||||
instances_schedule=[],
|
||||
loop_limit=-1,
|
||||
ammo_limit=10,
|
||||
headers=[],
|
||||
ammo_file="data/empty.uri",
|
||||
).write(stpd_file)
|
Loading…
Reference in New Issue
Block a user