tests: change wifi tests expect timeout to 60

- wifi_router
- wifi_ap
- wifi_high_traffic
This commit is contained in:
Fu Hanxi
2026-03-12 15:59:26 +08:00
parent 9df5d023bc
commit 84d80dd37d
20 changed files with 165 additions and 164 deletions
@@ -39,7 +39,7 @@ def test_examples_tcp_server_ipv4(dut: Dut) -> None:
ap_ssid = get_env_config_variable(env_name, 'ap_ssid')
ap_password = get_env_config_variable(env_name, 'ap_password')
dut.write(f'{ap_ssid} {ap_password}')
ipv4 = dut.expect(r'IPv4 address: (\d+\.\d+\.\d+\.\d+)[^\d]', timeout=30)[1].decode()
ipv4 = dut.expect(r'IPv4 address: (\d+\.\d+\.\d+\.\d+)[^\d]', timeout=60)[1].decode()
logging.info(f'Connected with IPv4={ipv4}')
time.sleep(1)
@@ -69,7 +69,7 @@ def test_examples_tcp_server_ipv4_esp32c2_26mhz(dut: Dut) -> None:
ap_ssid = get_env_config_variable(env_name, 'ap_ssid')
ap_password = get_env_config_variable(env_name, 'ap_password')
dut.write(f'{ap_ssid} {ap_password}')
ipv4 = dut.expect(r'IPv4 address: (\d+\.\d+\.\d+\.\d+)[^\d]', timeout=30)[1].decode()
ipv4 = dut.expect(r'IPv4 address: (\d+\.\d+\.\d+\.\d+)[^\d]', timeout=60)[1].decode()
logging.info(f'Connected with IPv4={ipv4}')
time.sleep(1)
@@ -93,16 +93,16 @@ def test_examples_tcp_server_ipv6(dut: Dut) -> None:
ap_ssid = get_env_config_variable(env_name, 'ap_ssid')
ap_password = get_env_config_variable(env_name, 'ap_password')
dut.write(f'{ap_ssid} {ap_password}')
ipv4 = dut.expect(r'IPv4 address: (\d+\.\d+\.\d+\.\d+)[^\d]', timeout=30)[1].decode()
ipv4 = dut.expect(r'IPv4 address: (\d+\.\d+\.\d+\.\d+)[^\d]', timeout=60)[1].decode()
# expect all 8 octets from IPv6 (assumes it's printed in the long form)
ipv6_r = r':'.join((r'[0-9a-fA-F]{4}',) * 8)
ipv6 = dut.expect(ipv6_r, timeout=30)[0].decode()
ipv6 = dut.expect(ipv6_r, timeout=60)[0].decode()
logging.info(f'Connected with IPv4={ipv4} and IPv6={ipv6}')
time.sleep(1)
interface = get_my_interface_by_dest_ip(ipv4)
# test IPv6
received = tcp_client('{}%{}'.format(ipv6, interface), PORT, MESSAGE)
received = tcp_client(f'{ipv6}%{interface}', PORT, MESSAGE)
if not received == MESSAGE:
raise
dut.expect(MESSAGE)
@@ -123,7 +123,7 @@ def test_examples_tcp_server_ipv6_only(dut: Dut) -> None:
dut.write(f'{ap_ssid} {ap_password}')
# expect all 8 octets from IPv6 (assumes it's printed in the long form)
ipv6_r = r':'.join((r'[0-9a-fA-F]{4}',) * 8)
ipv6 = dut.expect(ipv6_r, timeout=30)[0].decode()
ipv6 = dut.expect(ipv6_r, timeout=60)[0].decode()
logging.info(f'Connected AP with IPv6={ipv6}')
time.sleep(5)