Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions tests/services/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1108,8 +1108,8 @@ def test_service_browser_expire_callbacks():
# instantiate a zeroconf instance
zc = Zeroconf(interfaces=['127.0.0.1'])
# start a browser
type_ = "_http._tcp.local."
registration_name = "xxxyyy.%s" % type_
type_ = "_old._tcp.local."
registration_name = "uniquezip323.%s" % type_
callbacks = []

class MyServiceListener(r.ServiceListener):
Expand All @@ -1132,11 +1132,11 @@ def update_service(self, zc, type_, name) -> None:

browser = r.ServiceBrowser(zc, type_, None, listener)

desc = {'path': '/~paulsm/'}
address_parsed = "10.0.1.2"
desc = {'path': '/~paul2/'}
address_parsed = "10.0.1.3"
address = socket.inet_aton(address_parsed)
info = ServiceInfo(
type_, registration_name, 80, 0, 0, desc, "ash-2.local.", host_ttl=1, other_ttl=1, addresses=[address]
type_, registration_name, 80, 0, 0, desc, "newname-2.local.", host_ttl=1, other_ttl=1, addresses=[address]
)

def mock_incoming_msg(records) -> r.DNSIncoming:
Expand All @@ -1149,7 +1149,7 @@ def mock_incoming_msg(records) -> r.DNSIncoming:
zc,
mock_incoming_msg([info.dns_pointer(), info.dns_service(), info.dns_text(), *info.dns_addresses()]),
)
time.sleep(0.2)
time.sleep(0.3)
info.port = 400
_inject_response(
zc,
Expand All @@ -1160,7 +1160,7 @@ def mock_incoming_msg(records) -> r.DNSIncoming:
('add', type_, registration_name),
('update', type_, registration_name),
]
time.sleep(1.2)
time.sleep(1.1)
assert callbacks == [
('add', type_, registration_name),
('update', type_, registration_name),
Expand Down