From a179cb6913dd73ce95e4d30c690bd12cae075309 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 26 Mar 2026 14:07:30 +1100 Subject: [PATCH] tests: Use a unique domain name for tests/multi_wlan/getaddrinfo. Otherwise test can fail if the "should fail" lookup is resolved from a cached result. Signed-off-by: Angus Gratton --- tests/multi_wlan/getaddrinfo.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/multi_wlan/getaddrinfo.py b/tests/multi_wlan/getaddrinfo.py index 6b95c7e6f0..8ad6155ed0 100644 --- a/tests/multi_wlan/getaddrinfo.py +++ b/tests/multi_wlan/getaddrinfo.py @@ -20,8 +20,11 @@ def instance0(): multitest.next() + # Note: Lookup domain for this test doesn't need to exist, as the board + # isn't internet connected. It also shouldn't exist, so a cached result is + # never returned! try: - socket.getaddrinfo("micropython.org", 80) + socket.getaddrinfo("doesnotexist.example.com", 80) except OSError as er: print( "active(0) failed" @@ -30,7 +33,7 @@ def instance0(): wlan.active(1) try: - socket.getaddrinfo("micropython.org", 80) + socket.getaddrinfo("doesnotexist.example.com", 80) except OSError as er: print( "active(1) failed", er.errno in (-2, -202)