Skip to content

Commit

Permalink
qa: Ignore "Reducing -maxconnections..." warning in stderr
Browse files Browse the repository at this point in the history
On systems such as NetBSD, this change enables the execution of
functional tests.
  • Loading branch information
hebasto committed Dec 19, 2024
1 parent c1252b1 commit fb04d98
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/functional/test_framework/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,9 @@ def is_node_stopped(self, *, expected_stderr="", expected_ret_code=0):
# Check that stderr is as expected
self.stderr.seek(0)
stderr = self.stderr.read().decode('utf-8').strip()
# On systems such as NetBSD, the following warning is always printed.
allowed_warning = r"Warning: Reducing -maxconnections from \d+ to \d+, because of system limitations\."
stderr = re.sub(allowed_warning, "", stderr).strip()
if stderr != expected_stderr:
raise AssertionError("Unexpected stderr {} != {}".format(stderr, expected_stderr))

Expand Down Expand Up @@ -671,6 +674,9 @@ def assert_start_raises_init_error(self, extra_args=None, expected_msg=None, mat
if expected_msg is not None:
log_stderr.seek(0)
stderr = log_stderr.read().decode('utf-8').strip()
# On systems such as NetBSD, the following warning is always printed.
allowed_warning = r"Warning: Reducing -maxconnections from \d+ to \d+, because of system limitations\."
stderr = re.sub(allowed_warning, "", stderr).strip()
if match == ErrorMatch.PARTIAL_REGEX:
if re.search(expected_msg, stderr, flags=re.MULTILINE) is None:
self._raise_assertion_error(
Expand Down

0 comments on commit fb04d98

Please sign in to comment.