aboutsummaryrefslogtreecommitdiff
path: root/test_adb.py
diff options
context:
space:
mode:
authorJoshua Duong <joshuaduong@google.com>2020-04-07 15:16:42 -0700
committerJoshua Duong <joshuaduong@google.com>2020-05-05 00:21:12 -0700
commit357111f465f83417fec0c501430abae5251e71bc (patch)
tree2c743bca971dd21ca84adfb7b827936097943057 /test_adb.py
parent608d5a77675c08bed40974be6978d504252f1e4d (diff)
downloadadb-357111f465f83417fec0c501430abae5251e71bc.tar.gz
[adb client] Fix mdns discovery service registry.
We were getting stale service ip addresses because we weren't destroying the sdref correctly. Also, we were leaking the ResolvedServices when removing it from the ServiceRegistry. Converted them to smart pointers to fix that. Bug: 153343580 Test: test_adb.py Change-Id: Ib7c1dbf54937d4ac6d9885cb5f7289bef616d12e
Diffstat (limited to 'test_adb.py')
-rwxr-xr-xtest_adb.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test_adb.py b/test_adb.py
index 03bdcbd8..9912f11e 100755
--- a/test_adb.py
+++ b/test_adb.py
@@ -659,14 +659,14 @@ class MdnsTest(unittest.TestCase):
print(f"Registering {serv_instance}.{serv_type} ...")
with zeroconf_register_service(zc, service_info) as info:
"""Give adb some time to register the service"""
- time.sleep(0.25)
+ time.sleep(1)
print(f"services={_mdns_services(server_port)}")
self.assertTrue(any((serv_instance in line and serv_type in line)
for line in _mdns_services(server_port)))
"""Give adb some time to unregister the service"""
print("Unregistering mdns service...")
- time.sleep(0.25)
+ time.sleep(1)
print(f"services={_mdns_services(server_port)}")
self.assertFalse(any((serv_instance in line and serv_type in line)
for line in _mdns_services(server_port)))