mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-01-27 04:53:13 -05:00
functional test: reduce failure criteria
Signed-off-by: hrj <harshad.rj@gmail.com>
This commit is contained in:
parent
96b5808628
commit
1d746f7655
@ -7,14 +7,12 @@ import subprocess
|
||||
|
||||
@events.quitting.add_listener
|
||||
def _(environment, **kw):
|
||||
if environment.stats.total.fail_ratio > 0.02:
|
||||
logging.error("Test failed due to failure ratio > 2%")
|
||||
totalStats = environment.stats.total
|
||||
if totalStats.fail_ratio > 0.20:
|
||||
logging.error("Test failed due to failure ratio " + totalStats.fail_ratio + " > 20%")
|
||||
environment.process_exit_code = 1
|
||||
elif environment.stats.total.avg_response_time > 300:
|
||||
logging.error("Test failed due to average response time ratio > 300 ms")
|
||||
environment.process_exit_code = 1
|
||||
elif environment.stats.total.get_response_time_percentile(0.95) > 800:
|
||||
logging.error("Test failed due to 95th percentile response time > 800 ms")
|
||||
elif totalStats.get_response_time_percentile(0.80) > 800:
|
||||
logging.error("Test failed due to 80th percentile response time > 800 ms")
|
||||
environment.process_exit_code = 1
|
||||
else:
|
||||
environment.process_exit_code = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user