mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-02-06 00:38:06 -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
|
@events.quitting.add_listener
|
||||||
def _(environment, **kw):
|
def _(environment, **kw):
|
||||||
if environment.stats.total.fail_ratio > 0.02:
|
totalStats = environment.stats.total
|
||||||
logging.error("Test failed due to failure ratio > 2%")
|
if totalStats.fail_ratio > 0.20:
|
||||||
|
logging.error("Test failed due to failure ratio " + totalStats.fail_ratio + " > 20%")
|
||||||
environment.process_exit_code = 1
|
environment.process_exit_code = 1
|
||||||
elif environment.stats.total.avg_response_time > 300:
|
elif totalStats.get_response_time_percentile(0.80) > 800:
|
||||||
logging.error("Test failed due to average response time ratio > 300 ms")
|
logging.error("Test failed due to 80th percentile response time > 800 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")
|
|
||||||
environment.process_exit_code = 1
|
environment.process_exit_code = 1
|
||||||
else:
|
else:
|
||||||
environment.process_exit_code = 0
|
environment.process_exit_code = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user