From ceaad79262d156bd1974673419aa3af6d2b45c16 Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Tue, 9 Jul 2024 00:39:41 +0300 Subject: [PATCH] Relax the condition in TestProcess.test_connections() a bit --- minode/tests/test_process.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/minode/tests/test_process.py b/minode/tests/test_process.py index 4653f61..64af82e 100644 --- a/minode/tests/test_process.py +++ b/minode/tests/test_process.py @@ -84,7 +84,7 @@ class TestProcessShutdown(TestProcessProto): class TestProcess(TestProcessProto): """The test case for minode process""" - _wait_time = 120 + _wait_time = 180 _check_limit = False def test_connections(self): @@ -104,7 +104,7 @@ class TestProcess(TestProcessProto): time.sleep(1) for _ in range(self._wait_time * 2): - if len(self.connections()) > self._connection_limit / 2: + if len(self.connections()) >= self._connection_limit / 2: _time_to_connect = round(time.time() - _started) break if '--i2p' not in self._process_cmd: @@ -116,7 +116,7 @@ class TestProcess(TestProcessProto): time.sleep(0.5) else: self.fail( - 'Failed establish at least %i connections in %s sec' + 'Failed to establish at least %i connections in %s sec' % (int(self._connection_limit / 2), self._wait_time)) if self._check_limit: