Gemalto Crinterion UDP test adjustments

Adjusting the tests to match the cellular modems ELS61-E2 and BGS2-W requirements.
pull/9288/head
Michal Paszta 2019-01-08 11:50:28 +01:00
parent aff2bee8a4
commit 6e629e1ba6
2 changed files with 7 additions and 1 deletions

View File

@ -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;
}

View File

@ -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());