Skip to content

ServiceTypesQuery.test_integration_with_listener_ipv6 sometimes fail on mac #813

@bdraco

Description

@bdraco

____________ ServiceTypesQuery.test_integration_with_listener_ipv6 _____________

self = <tests.services.test_types.ServiceTypesQuery testMethod=test_integration_with_listener_ipv6>

@unittest.skipIf(not has_working_ipv6() or sys.platform == 'win32', 'Requires IPv6')
@unittest.skipIf(os.environ.get('SKIP_IPV6'), 'IPv6 tests disabled')
def test_integration_with_listener_ipv6(self):

    type_ = "_test-listenv6ip-type._tcp.local."
    name = "xxxyyy"
    registration_name = "%s.%s" % (name, type_)

    zeroconf_registrar = Zeroconf(ip_version=r.IPVersion.V6Only)
    desc = {'path': '/~paulsm/'}
    info = ServiceInfo(
        type_,
        registration_name,
        80,
        0,
        0,
        desc,
        "ash-2.local.",
        addresses=[socket.inet_aton("10.0.1.2")],
    )
    zeroconf_registrar.registry.add(info)
    try:
        service_types = ZeroconfServiceTypes.find(ip_version=r.IPVersion.V6Only, timeout=0.5)
        assert type_ in service_types
        _clear_cache(zeroconf_registrar)
        service_types = ZeroconfServiceTypes.find(zc=zeroconf_registrar, timeout=0.5)
      assert type_ in service_types

E AssertionError: assert '_test-listenv6ip-type._tcp.local.' in ('_net-assistant._udp.local.', '_rfb._tcp.local.', '_sftp-ssh._tcp.local.', '_ssh._tcp.local.')

tests/services/test_types.py:107: AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions