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.
pull/3781/head
Christopher Haster 2017-02-15 11:46:04 -06:00
parent 21b91c794e
commit 64ccff3fe1
1 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,7 @@ import socket
import json
import random
import itertools
import time
from sys import stdout
from threading import Thread
from SocketServer import BaseRequestHandler, UDPServer
@ -42,6 +43,9 @@ class UDPEchoClientHandler(BaseRequestHandler):
data = ''.join(map(chr, data))
sock.sendto(data, self.client_address)
# Sleep a tiny bit to compensate for local network
time.sleep(0.01)
class UDPEchoClientTest(BaseHostTest):
def __init__(self):