Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TESTS: rename variable interface to fix broken tests #14697

Merged
merged 1 commit into from
May 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions TESTS/integration/net-single/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ void led_thread()
#endif

#define MAX_RETRIES 3
NetworkInterface *interface = NULL;
NetworkInterface *netif = NULL;
static control_t setup_network(const size_t call_count)
{
interface = NetworkInterface::get_default_instance();
TEST_ASSERT_NOT_NULL_MESSAGE(interface, "failed to initialize network");
netif = NetworkInterface::get_default_instance();
TEST_ASSERT_NOT_NULL_MESSAGE(netif, "failed to initialize network");

nsapi_error_t err = -1;
for (int tries = 0; tries < MAX_RETRIES; tries++) {
err = interface->connect();
err = netif->connect();
if (err == NSAPI_ERROR_OK) {
break;
} else {
Expand All @@ -78,34 +78,34 @@ static control_t setup_network(const size_t call_count)

static control_t download_128(const size_t call_count)
{
download_test(interface, story, sizeof(story), 128);
download_test(netif, story, sizeof(story), 128);

return CaseNext;
}
static control_t download_256(const size_t call_count)
{
download_test(interface, story, sizeof(story), 256);
download_test(netif, story, sizeof(story), 256);

return CaseNext;
}

static control_t download_1k(const size_t call_count)
{
download_test(interface, story, sizeof(story), 1024);
download_test(netif, story, sizeof(story), 1024);

return CaseNext;
}

static control_t download_2k(const size_t call_count)
{
download_test(interface, story, sizeof(story), 2 * 1024);
download_test(netif, story, sizeof(story), 2 * 1024);

return CaseNext;
}

static control_t download_4k(const size_t call_count)
{
download_test(interface, story, sizeof(story), 4 * 1024);
download_test(netif, story, sizeof(story), 4 * 1024);

return CaseNext;
}
Expand Down
10 changes: 5 additions & 5 deletions TESTS/integration/stress-net-fs/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ void led_thread()
#endif

#define MAX_RETRIES 3
NetworkInterface *interface = NULL;
NetworkInterface *netif = NULL;

static control_t setup_network(const size_t call_count)
{
interface = NetworkInterface::get_default_instance();
TEST_ASSERT_NOT_NULL_MESSAGE(interface, "failed to initialize network");
netif = NetworkInterface::get_default_instance();
TEST_ASSERT_NOT_NULL_MESSAGE(netif, "failed to initialize network");

nsapi_error_t err = -1;
for (int tries = 0; tries < MAX_RETRIES; tries++) {
err = interface->connect();
err = netif->connect();
if (err == NSAPI_ERROR_OK) {
break;
} else {
Expand Down Expand Up @@ -106,7 +106,7 @@ static uint32_t thread_counter = 0;
void download_fn()
{
uint32_t thread_id = core_util_atomic_incr_u32(&thread_counter, 1);
download_test(interface, story, sizeof(story), 256, thread_id);
download_test(netif, story, sizeof(story), 256, thread_id);
}
void file_fn(size_t buffer)
{
Expand Down