]> granicus.if.org Git - esp-idf/commitdiff
asio example tests: Increase timeout for DHCP lease to 30s
authorAngus Gratton <angus@espressif.com>
Fri, 3 Aug 2018 06:59:23 +0000 (16:59 +1000)
committerAngus Gratton <gus@projectgus.com>
Fri, 3 Aug 2018 06:59:23 +0000 (16:59 +1000)
Covers time to connect to WiFi and negotiate lease,
may be more than 5-10s on some busy APs

examples/protocols/asio/chat_client/asio_chat_client_test.py
examples/protocols/asio/chat_server/asio_chat_server_test.py
examples/protocols/asio/tcp_echo_server/asio_tcp_server_test.py
examples/protocols/asio/udp_echo_server/asio_udp_server_test.py

index a1cce97c5aba23c1b37c4e7fc227289066bdc260..5d6af28eef9bbb2fe65d6990be25b4a089f41ccc 100644 (file)
@@ -75,7 +75,7 @@ def test_examples_protocol_asio_chat_client(env, extra_data):
     thread1.start()
     # 2. start the dut test and wait till client gets IP address
     dut1.start_app()
-    data = dut1.expect(re.compile(r" sta ip: ([^,]+),"))
+    data = dut1.expect(re.compile(r" sta ip: ([^,]+),"), timeout=30)
     # 3. send host's IP to the client i.e. the `dut1`
     dut1.write(host_ip)
     # 4. client `dut1` should receive a message
index 55746f1f97b59b2ef12ddb19c8657ddf97bd2fe1..b5eb71ff6fc1d64e7b0a8a785ce129985bbf122c 100644 (file)
@@ -37,7 +37,7 @@ def test_examples_protocol_asio_chat_server(env, extra_data):
     # 1. start test
     dut1.start_app()
     # 2. get the server IP address
-    data = dut1.expect(re.compile(r" sta ip: ([^,]+),"))
+    data = dut1.expect(re.compile(r" sta ip: ([^,]+),"), timeout=30)
     # 3. create tcp client and connect to server
     cli = socket(AF_INET,SOCK_STREAM)
     cli.connect((data[0],80))
index 1ab432e62677ca32c5f545bf8c52753eaffce62f..6dcffa3a5d2d3ebf46b97310d8bcf0a8be4bf41d 100644 (file)
@@ -38,7 +38,7 @@ def test_examples_protocol_asio_tcp_server(env, extra_data):
     # 1. start test
     dut1.start_app()
     # 2. get the server IP address
-    data = dut1.expect(re.compile(r" sta ip: ([^,]+),"))
+    data = dut1.expect(re.compile(r" sta ip: ([^,]+),"), timeout=30)
     # 3. create tcp client and connect to server
     cli = socket(AF_INET,SOCK_STREAM)
     cli.connect((data[0],80))
index 490a8007a854a0f46324d74723afff1e2aa5b7f5..642c686ed8df4c2f0070cfaf74c629a6642c869e 100644 (file)
@@ -38,7 +38,7 @@ def test_examples_protocol_asio_udp_server(env, extra_data):
     # 1. start test
     dut1.start_app()
     # 2. get the server IP address
-    data = dut1.expect(re.compile(r" sta ip: ([^,]+),"))
+    data = dut1.expect(re.compile(r" sta ip: ([^,]+),"), timeout=30)
     # 3. create tcp client and connect to server
     cli = socket(AF_INET, SOCK_DGRAM)
     cli.connect((data[0], 80))