Skip to content

Commit 64ccff3

Browse files
committed
lwip: Added delay to dtls handshake test to compensate for local network
The speed of packets on the local network exceeds even the speed of the ethernet hardware on some of the less powerful devices. Adding a small delay which can be expected from a real DTLS handshake prevents this condition from occuring.
1 parent 21b91c7 commit 64ccff3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

features/FEATURE_LWIP/TESTS/mbedmicro-net/host_tests/udp_shotgun.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import json
2121
import random
2222
import itertools
23+
import time
2324
from sys import stdout
2425
from threading import Thread
2526
from SocketServer import BaseRequestHandler, UDPServer
@@ -42,6 +43,9 @@ def handle(self):
4243
data = ''.join(map(chr, data))
4344
sock.sendto(data, self.client_address)
4445

46+
# Sleep a tiny bit to compensate for local network
47+
time.sleep(0.01)
48+
4549

4650
class UDPEchoClientTest(BaseHostTest):
4751
def __init__(self):

0 commit comments

Comments
 (0)