mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #9288 from michalpasztamobica/gemalto_crinterion_test_updates
Gemalto Crinterion UDP test adjustmentspull/10931/head
commit
bfc46467d0
|
@ -109,6 +109,10 @@ void udpsocket_echotest_nonblock_receiver(void *receive_bytes)
|
|||
wait_ms(WAIT2RECV_TIMEOUT);
|
||||
--retry_cnt;
|
||||
continue;
|
||||
} else if (recvd < 0) {
|
||||
printf("sock.recvfrom returned %d\n", recvd);
|
||||
TEST_FAIL();
|
||||
break;
|
||||
} else if (recvd == expt2recv) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -43,12 +43,14 @@ void UDPSOCKET_SENDTO_TIMEOUT()
|
|||
TEST_ASSERT_EQUAL(sizeof(tx_buffer), sent);
|
||||
TEST_ASSERT(timer.read_ms() <= 100);
|
||||
|
||||
sock.set_timeout(1000);
|
||||
|
||||
timer.reset();
|
||||
timer.start();
|
||||
sent = sock.sendto(udp_addr, tx_buffer, sizeof(tx_buffer));
|
||||
timer.stop();
|
||||
TEST_ASSERT_EQUAL(sizeof(tx_buffer), sent);
|
||||
TEST_ASSERT(timer.read_ms() <= 100);
|
||||
TEST_ASSERT(timer.read_ms() <= 1000);
|
||||
printf("MBED: Time taken: %fs\n", timer.read());
|
||||
|
||||
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
|
||||
|
|
Loading…
Reference in New Issue