Merge branch 'bugfix/example_test_socket_issue_4.3' into 'release/v4.3'

CI: fix connection failures in asio example tests (4.3)

See merge request espressif/esp-idf!13903
This commit is contained in:
He Yin Ling
2021-06-09 10:33:43 +00:00
6 changed files with 9 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ def test_examples_protocol_asio_chat_server(env, extra_data):
# 2. get the server IP address
data = dut1.expect(re.compile(r' IPv4 address: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)'), timeout=30)
# 3. create tcp client and connect to server
dut1.expect('ASIO engine is up and running', timeout=1)
cli = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
cli.settimeout(30)
cli.connect((data[0], 2222))

View File

@@ -225,5 +225,7 @@ extern "C" void app_main(void)
servers.emplace_back(io_context, endpoint);
}
std::cout << "ASIO engine is up and running" << std::endl;
io_context.run();
}

View File

@@ -26,6 +26,7 @@ def test_examples_protocol_asio_tcp_server(env, extra_data):
# 2. get the server IP address
data = dut1.expect(re.compile(r' IPv4 address: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)'), timeout=30)
# 3. create tcp client and connect to server
dut1.expect('ASIO engine is up and running', timeout=1)
cli = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
cli.settimeout(30)
cli.connect((data[0], 2222))

View File

@@ -102,5 +102,7 @@ extern "C" void app_main(void)
server s(io_context, std::atoi(CONFIG_EXAMPLE_PORT));
std::cout << "ASIO engine is up and running" << std::endl;
io_context.run();
}

View File

@@ -26,6 +26,7 @@ def test_examples_protocol_asio_udp_server(env, extra_data):
# 2. get the server IP address
data = dut1.expect(re.compile(r' IPv4 address: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)'), timeout=30)
# 3. create tcp client and connect to server
dut1.expect('ASIO engine is up and running', timeout=1)
cli = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
cli.settimeout(30)
cli.connect((data[0], 2222))

View File

@@ -84,5 +84,7 @@ extern "C" void app_main(void)
server s(io_context, std::atoi(CONFIG_EXAMPLE_PORT));
std::cout << "ASIO engine is up and running" << std::endl;
io_context.run();
}