mDNS: Fix example test in CI using multiple retries

This commit is contained in:
Suren Gabrielyan
2022-12-30 19:50:22 +04:00
parent 389a848a6a
commit bcfd9818f2
2 changed files with 33 additions and 11 deletions

View File

@@ -78,7 +78,7 @@ def mdns_server(esp_host):
print('Received query: {} '.format(dns.__repr__()))
sock.sendto(get_dns_answer_to_mdns_lwip(TESTER_NAME_LWIP, dns.id), addr)
if len(dns.an) > 0 and dns.an[0].type == dpkt.dns.DNS_A:
if dns.an[0].name == esp_host + u'.local':
if dns.an[0].name.startswith(esp_host + u'.local'):
print('Received answer to esp32-mdns query: {}'.format(dns.__repr__()))
esp_answered.set()
except socket.timeout: