mirror of https://github.com/ARMmbed/mbed-os.git
Gemalto Crinterion UDP test adjustments
Adjusting the tests to match the cellular modems ELS61-E2 and BGS2-W requirements.pull/9288/head
parent
aff2bee8a4
commit
6e629e1ba6
|
@ -109,6 +109,10 @@ void udpsocket_echotest_nonblock_receiver(void *receive_bytes)
|
||||||
wait_ms(WAIT2RECV_TIMEOUT);
|
wait_ms(WAIT2RECV_TIMEOUT);
|
||||||
--retry_cnt;
|
--retry_cnt;
|
||||||
continue;
|
continue;
|
||||||
|
} else if (recvd < 0) {
|
||||||
|
printf("sock.recvfrom returned %d\n", recvd);
|
||||||
|
TEST_FAIL();
|
||||||
|
break;
|
||||||
} else if (recvd == expt2recv) {
|
} else if (recvd == expt2recv) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,12 +43,14 @@ void UDPSOCKET_SENDTO_TIMEOUT()
|
||||||
TEST_ASSERT_EQUAL(sizeof(tx_buffer), sent);
|
TEST_ASSERT_EQUAL(sizeof(tx_buffer), sent);
|
||||||
TEST_ASSERT(timer.read_ms() <= 100);
|
TEST_ASSERT(timer.read_ms() <= 100);
|
||||||
|
|
||||||
|
sock.set_timeout(1000);
|
||||||
|
|
||||||
timer.reset();
|
timer.reset();
|
||||||
timer.start();
|
timer.start();
|
||||||
sent = sock.sendto(udp_addr, tx_buffer, sizeof(tx_buffer));
|
sent = sock.sendto(udp_addr, tx_buffer, sizeof(tx_buffer));
|
||||||
timer.stop();
|
timer.stop();
|
||||||
TEST_ASSERT_EQUAL(sizeof(tx_buffer), sent);
|
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());
|
printf("MBED: Time taken: %fs\n", timer.read());
|
||||||
|
|
||||||
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
|
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
|
||||||
|
|
Loading…
Reference in New Issue