Skip to content

test_service_browser_expire_callbacks fails on aarch64 and ppc64le with version 0.38.6 #1077

Closed

Description

@ggardet

test_service_browser_expire_callbacks test fails on openSUSE Tubmleweed aarch64 and ppc64le with version 0.38.6.

Log:

[  130s] =================================== FAILURES ===================================
[  130s] ____________________ test_service_browser_expire_callbacks _____________________
[  130s] 
[  130s]     @patch.object(_handlers, '_DNS_PTR_MIN_TTL', 1)
[  130s]     @patch.object(_core, "_CACHE_CLEANUP_INTERVAL", 10)
[  130s]     def test_service_browser_expire_callbacks():
[  130s]         """Test that the ServiceBrowser matching does not match partial names."""
[  130s]         # instantiate a zeroconf instance
[  130s]         zc = Zeroconf(interfaces=['127.0.0.1'])
[  130s]         # start a browser
[  130s]         type_ = "_old._tcp.local."
[  130s]         registration_name = "uniquezip323.%s" % type_
[  130s]         callbacks = []
[  130s]     
[  130s]         class MyServiceListener(r.ServiceListener):
[  130s]             def add_service(self, zc, type_, name) -> None:
[  130s]                 nonlocal callbacks
[  130s]                 if name == registration_name:
[  130s]                     callbacks.append(("add", type_, name))
[  130s]     
[  130s]             def remove_service(self, zc, type_, name) -> None:
[  130s]                 nonlocal callbacks
[  130s]                 if name == registration_name:
[  130s]                     callbacks.append(("remove", type_, name))
[  130s]     
[  130s]             def update_service(self, zc, type_, name) -> None:
[  130s]                 nonlocal callbacks
[  130s]                 if name == registration_name:
[  130s]                     callbacks.append(("update", type_, name))
[  130s]     
[  130s]         listener = MyServiceListener()
[  130s]     
[  130s]         browser = r.ServiceBrowser(zc, type_, None, listener)
[  130s]     
[  130s]         desc = {'path': '/~paul2/'}
[  130s]         address_parsed = "10.0.1.3"
[  130s]         address = socket.inet_aton(address_parsed)
[  130s]         info = ServiceInfo(
[  130s]             type_,
[  130s]             registration_name,
[  130s]             80,
[  130s]             0,
[  130s]             0,
[  130s]             desc,
[  130s]             "newname-2.local.",
[  130s]             host_ttl=1,
[  130s]             other_ttl=1,
[  130s]             addresses=[address],
[  130s]         )
[  130s]     
[  130s]         def mock_incoming_msg(records) -> r.DNSIncoming:
[  130s]             generated = r.DNSOutgoing(const._FLAGS_QR_RESPONSE)
[  130s]             for record in records:
[  130s]                 generated.add_answer_at_time(record, 0)
[  130s]             return r.DNSIncoming(generated.packets()[0])
[  130s]     
[  130s]         _inject_response(
[  130s]             zc,
[  130s]             mock_incoming_msg([info.dns_pointer(), info.dns_service(), info.dns_text(), *info.dns_addresses()]),
[  130s]         )
[  130s]         time.sleep(0.3)
[  130s]         info.port = 400
[  130s]         _inject_response(
[  130s]             zc,
[  130s]             mock_incoming_msg([info.dns_service()]),
[  130s]         )
[  130s]     
[  130s] >       assert callbacks == [
[  130s]             ('add', type_, registration_name),
[  130s]             ('update', type_, registration_name),
[  130s]         ]
[  130s] E       AssertionError: assert [('add', '_ol..._tcp.local.')] == [('add', '_ol..._tcp.local.')]
[  130s] E         Right contains one more item: ('update', '_old._tcp.local.', 'uniquezip323._old._tcp.local.')
[  130s] E         Full diff:
[  130s] E           [
[  130s] E            ('add',
[  130s] E             '_old._tcp.local.',
[  130s] E             'uniquezip323._old._tcp.local.'),
[  130s] E         -  ('update',...
[  130s] E         
[  130s] E         ...Full output truncated (4 lines hidden), use '-vv' to show
[  130s] 
[  130s] tests/services/test_browser.py:1168: AssertionError

x86_64 and ppc64 are fine.

Activity

  1. bdraco commented on Oct 19, 2022

    @bdraco
    Member

    Is this still failing for you on the latest sha?

  2. ggardet commented on Oct 24, 2022

    @ggardet
    Author

    It does not fail anymore with version 0.39.1

  3. bdraco commented on Oct 24, 2022

    @bdraco
    Member

    Thanks for confirming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions