From: Tomas Krizek Date: Fri, 4 Jan 2019 15:20:21 +0000 (+0100) Subject: pytests/conn_flood: attempt to make test more stable in CI X-Git-Tag: v3.2.1~6^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6a58801d332955b80811bf7bfcc8ed498be52033;p=thirdparty%2Fknot-resolver.git pytests/conn_flood: attempt to make test more stable in CI --- diff --git a/tests/pytests/conn_flood.py b/tests/pytests/conn_flood.py index aa53b7007..8c2625a9a 100644 --- a/tests/pytests/conn_flood.py +++ b/tests/pytests/conn_flood.py @@ -17,8 +17,8 @@ from kresd import Kresd import utils -MAX_SOCKETS = 20000 # upper bound of how many connections to open -MAX_ITERATIONS = 20 # number of iterations to run the test +MAX_SOCKETS = 10000 # upper bound of how many connections to open +MAX_ITERATIONS = 10 # number of iterations to run the test # we can't use softlimit ifself since kresd already has open sockets, # so use lesser value @@ -50,8 +50,8 @@ def test_conn_flood(tmpdir, sock_func_name): for s in sockets: utils.ping_alive(s) - # break when no more than 10% additional sockets are created - if additional_sockets / len(sockets) < 0.1: + # break when no more than 20% additional sockets are created + if additional_sockets / len(sockets) < 0.2: return sockets max_num_of_open_files = resource.getrlimit(resource.RLIMIT_NOFILE)[0] - RESERVED_NOFILE