Skip to content

Commit 36bc2ef

Browse files
committed
Merge branch 'greentea_improvements' of https://github.com/michalpasztamobica/mbed-os into dev_rollup
2 parents 61c7947 + e53ee63 commit 36bc2ef

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void ASYNCHRONOUS_DNS_NON_ASYNC_AND_ASYNC()
4545
TEST_ASSERT(strlen(addr.get_ip_address()) > 1);
4646
}
4747

48-
semaphore.wait();
48+
semaphore.wait(100);
4949

5050
TEST_ASSERT(data.result == NSAPI_ERROR_OK);
5151

TESTS/netsocket/tcp/tcp_tests.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ nsapi_error_t tcpsocket_connect_to_discard_srv(TCPSocket &sock);
3030
int split2half_rmng_tcp_test_time(); // [s]
3131

3232
namespace tcp_global {
33-
static const int TESTS_TIMEOUT = 960;
33+
static const int TESTS_TIMEOUT = 480;
3434
static const int TCP_OS_STACK_SIZE = 2048;
3535

3636
static const int RX_BUFF_SIZE = 1220;

TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ void TCPSOCKET_RECV_TIMEOUT()
6666
TEST_FAIL();
6767
goto CLEANUP;
6868
}
69-
printf("MBED: recv() took: %dms\n", timer.read_ms());
70-
TEST_ASSERT_INT_WITHIN(50, 150, timer.read_ms());
69+
printf("MBED: recv() took: %dus\n", timer.read_us());
70+
TEST_ASSERT_INT_WITHIN(51, 150, (timer.read_us() + 500) / 1000);
7171
continue;
7272
} else if (recvd < 0) {
7373
printf("[pkt#%02d] network error %d\n", i, recvd);

TESTS/network/interface/networkinterface_status.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ void NETWORKINTERFACE_STATUS()
8989
}
9090
TEST_ASSERT_EQUAL(NSAPI_STATUS_GLOBAL_UP, status);
9191

92-
net->disconnect();
92+
err = net->disconnect();
93+
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, err);
9394

9495
status = wait_status_callback();
9596
TEST_ASSERT_EQUAL(NSAPI_STATUS_DISCONNECTED, status);
@@ -123,7 +124,8 @@ void NETWORKINTERFACE_STATUS_NONBLOCK()
123124
}
124125
TEST_ASSERT_EQUAL(NSAPI_STATUS_GLOBAL_UP, status);
125126

126-
net->disconnect();
127+
err = net->disconnect();
128+
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, err);
127129

128130
status = wait_status_callback();
129131
TEST_ASSERT_EQUAL(NSAPI_STATUS_DISCONNECTED, status);
@@ -150,7 +152,8 @@ void NETWORKINTERFACE_STATUS_GET()
150152
wait(0.5);
151153
}
152154

153-
net->disconnect();
155+
err = net->disconnect();
156+
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, err);
154157

155158
TEST_ASSERT_EQUAL(NSAPI_STATUS_DISCONNECTED, net->get_connection_status());
156159
}

0 commit comments

Comments
 (0)