Skip to content

Commit 776fe4b

Browse files
authored
Fix sockets.test_nodejs_sockets_echo_connect_failure (#25332)
On 3/4 of my systems (Windows, Linux and a macOS), I get `"Host is unreachable"`. On 1/4 of my systems, (Windows 10), I get a `"Connection refused"`.
1 parent 585df33 commit 776fe4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test_sockets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def test_nodejs_sockets_echo(self, harness_class, port, args):
337337
self.do_runf('sockets/test_sockets_echo_client.c', expected, cflags=['-DSOCKK=%d' % harness.listen_port] + args)
338338

339339
def test_nodejs_sockets_connect_failure(self):
340-
self.do_runf('sockets/test_sockets_echo_client.c', 'connect failed: Connection refused', cflags=['-DSOCKK=666'], assert_returncode=NON_ZERO)
340+
self.do_runf('sockets/test_sockets_echo_client.c', r'connect failed: (Connection refused|Host is unreachable)', regex=True, cflags=['-DSOCKK=666'], assert_returncode=NON_ZERO)
341341

342342
@requires_native_clang
343343
@requires_python_dev_packages

0 commit comments

Comments
 (0)