mirror of https://github.com/ARMmbed/mbed-os.git
Update Greentea netsocket and wifi tests
Increase timeout for netsocket TCP and UDP tests. Old timeout (240 seconds) was not enough for slower devices to complete the tests. Accept error codes NSAPI_ERROR_CONNECTION_TIMEOUT and NSAPI_ERROR_NO_CONNECTION when running test wifi_connect_secure_failpull/7375/head
parent
7339fa0dea
commit
4affb4dbc5
|
@ -96,7 +96,7 @@ void fill_tx_buffer_ascii(char *buff, size_t len)
|
|||
// Test setup
|
||||
utest::v1::status_t greentea_setup(const size_t number_of_cases)
|
||||
{
|
||||
GREENTEA_SETUP(240, "default_auto");
|
||||
GREENTEA_SETUP(480, "default_auto");
|
||||
_ifup();
|
||||
return greentea_test_setup_handler(number_of_cases);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ void fill_tx_buffer_ascii(char *buff, size_t len)
|
|||
// Test setup
|
||||
utest::v1::status_t greentea_setup(const size_t number_of_cases)
|
||||
{
|
||||
GREENTEA_SETUP(240, "default_auto");
|
||||
GREENTEA_SETUP(480, "default_auto");
|
||||
_ifup();
|
||||
return greentea_test_setup_handler(number_of_cases);
|
||||
}
|
||||
|
|
|
@ -30,8 +30,11 @@ void wifi_connect_secure_fail(void)
|
|||
WiFiInterface *wifi = get_interface();
|
||||
|
||||
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->set_credentials(MBED_CONF_APP_WIFI_SECURE_SSID, "aaaaaaaa", get_security()));
|
||||
|
||||
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_AUTH_FAILURE, wifi->connect());
|
||||
nsapi_error_t error;
|
||||
error = wifi->connect();
|
||||
TEST_ASSERT(error == NSAPI_ERROR_AUTH_FAILURE ||
|
||||
error == NSAPI_ERROR_CONNECTION_TIMEOUT ||
|
||||
error == NSAPI_ERROR_NO_CONNECTION);
|
||||
}
|
||||
|
||||
#endif // defined(MBED_CONF_APP_WIFI_SECURE_SSID)
|
||||
|
|
Loading…
Reference in New Issue