This is because the ESP8266 is now waiting for SEND OK and takes much
more to complete the send_repeat, and echo_burst tests in RAAS.
(but has higher pass ratio).
UDPSocket can be used also similar to TCPSocket using connect(), send() and recv() methods.
This commit adds UDP ECHOTESTS which uses these methods instead of sendto() and recvfrom().
IPCore's netsocket tests are expected to run all tests even if some of them fail. The TEST_ASSERT_INT_WITHIN macro sets a global variable Unity.CurrentTestFailed which prevents further checks and gives incorrect failure count. Other assertion macros in Unity do not do that.
Test case printed IP address. If ip address is null, IAR compiled binary fails.
Added check for printing null. If IP address is null, then it prints string 'null'.
Deprecate wait() in favour of acquire(), try_acquire(),
try_acquire_for() and try_acquire_until().
Brings Semaphore more into line with CMSIS-RTOS 2 (which uses "acquire"),
itself (as it has "release"), and other classes having "try", "try for"
and "try until".
Also steps away from vague "wait" term - the primary operation here is
to acquire the semaphore, and this will of course sleep.
Reason for needing greater timeout could be this test's performance.
UDPSOCKET_ECHOTEST_BURST_NONBLOCK is implementing the receiving
differently and is passing with 1 second timeout.
The loop was wrongly incrementing the index of the array after assiging
the value. Thus the first array element was used twice and the last one
was never user. The issue is fixed and the loops are refactored and
simplified to avoid such confusion in the future.
Reason for needing greater timeout could be this test's performance.
UDPSOCKET_ECHOTEST_BURST_NONBLOCK is implementing the receiving
differently and is passing with 1 second timeout.
Now it is enough to add:
"macros": [
"MBED_GREENTEA_TEST_XXXSOCKET_TIMEOUT_S=20"
],
to mbed_app.json, where XXX is on of {DNS, TLS, UDP, TCP}.
Also network-* tests are now configurable: network-interface, network-wifi, network-emac with a similar macro.
Test case is allowed to take not more than a half what has been given
to the whole UDP suite.
UDP test cases reorganized so that the longest running ones are
executed last.
The whole README.md had to be updated to match the internal Confluence documentation, which can now be locked. In the process I also updated any spotted mistakes in tests documentation, removed the obsolete TCPServer tests documentation and added a test which was missing from UDPSocket's main.