René's URL Explorer Experiment


Title: Cache flush bit test fails because ServiceInfo will use expired records from the cache · Issue #738 · python-zeroconf/python-zeroconf · GitHub

Open Graph Title: Cache flush bit test fails because ServiceInfo will use expired records from the cache · Issue #738 · python-zeroconf/python-zeroconf

X Title: Cache flush bit test fails because ServiceInfo will use expired records from the cache · Issue #738 · python-zeroconf/python-zeroconf

Description: @pytest.mark.asyncio async def test_cache_flush_bit(): """Test that the cache flush bit sets the TTL to one for matching records.""" # instantiate a zeroconf instance aiozc = AsyncZeroconf(interfaces=['127.0.0.1']) zc = aiozc.zeroconf ty...

Open Graph Description: @pytest.mark.asyncio async def test_cache_flush_bit(): """Test that the cache flush bit sets the TTL to one for matching records.""" # instantiate a zeroconf instance aiozc = AsyncZeroconf(interfac...

X Description: @pytest.mark.asyncio async def test_cache_flush_bit(): """Test that the cache flush bit sets the TTL to one for matching records.""" # instantiate a zeroconf instance ...

Opengraph URL: https://github.com/python-zeroconf/python-zeroconf/issues/738

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cache flush bit test fails because ServiceInfo will use expired records from the cache","articleBody":"```\r\n\r\n    @pytest.mark.asyncio\r\n    async def test_cache_flush_bit():\r\n        \"\"\"Test that the cache flush bit sets the TTL to one for matching records.\"\"\"\r\n        # instantiate a zeroconf instance\r\n        aiozc = AsyncZeroconf(interfaces=['127.0.0.1'])\r\n        zc = aiozc.zeroconf\r\n    \r\n        type_ = \"_cacheflush._tcp.local.\"\r\n        name = \"knownname\"\r\n        registration_name = \"%s.%s\" % (name, type_)\r\n        desc = {'path': '/~paulsm/'}\r\n        server_name = \"server-uu1.local.\"\r\n        info = ServiceInfo(\r\n            type_, registration_name, 80, 0, 0, desc, server_name, addresses=[socket.inet_aton(\"10.0.1.2\")]\r\n        )\r\n        a_record = info.dns_addresses()[0]\r\n        zc.cache.async_add_records([info.dns_pointer(), a_record, info.dns_text(), info.dns_service()])\r\n    \r\n        info.addresses = [socket.inet_aton(\"10.0.1.5\"), socket.inet_aton(\"10.0.1.6\")]\r\n        new_records = info.dns_addresses()\r\n        for new_record in new_records:\r\n            assert new_record.unique is True\r\n    \r\n        original_a_record = zc.cache.async_get_unique(a_record)\r\n        # Do the run within 1s to verify the original record is not going to be expired\r\n        out = r.DNSOutgoing(const._FLAGS_QR_RESPONSE | const._FLAGS_AA, multicast=True)\r\n        for answer in new_records:\r\n            out.add_answer_at_time(answer, 0)\r\n        for packet in out.packets():\r\n            zc.record_manager.async_updates_from_response(r.DNSIncoming(packet))\r\n        assert zc.cache.async_get_unique(a_record) is original_a_record\r\n        assert original_a_record.ttl != 1\r\n        for record in new_records:\r\n            assert zc.cache.async_get_unique(record) is not None\r\n    \r\n        original_a_record.created = current_time_millis() - 1001\r\n    \r\n        # Do the run within 1s to verify the original record is not going to be expired\r\n        out = r.DNSOutgoing(const._FLAGS_QR_RESPONSE | const._FLAGS_AA, multicast=True)\r\n        for answer in new_records:\r\n            out.add_answer_at_time(answer, 0)\r\n        for packet in out.packets():\r\n            zc.record_manager.async_updates_from_response(r.DNSIncoming(packet))\r\n        assert original_a_record.ttl == 1\r\n        for record in new_records:\r\n            assert zc.cache.async_get_unique(record) is not None\r\n    \r\n        cached_records = [zc.cache.async_get_unique(record) for record in new_records]\r\n        for record in cached_records:\r\n            record.created = current_time_millis() - 1001\r\n    \r\n        fresh_address = socket.inet_aton(\"4.4.4.4\")\r\n        info.addresses = [fresh_address]\r\n        # Do the run within 1s to verify the two new records get marked as expired\r\n        out = r.DNSOutgoing(const._FLAGS_QR_RESPONSE | const._FLAGS_AA, multicast=True)\r\n        for answer in info.dns_addresses():\r\n            out.add_answer_at_time(answer, 0)\r\n        for packet in out.packets():\r\n            zc.record_manager.async_updates_from_response(r.DNSIncoming(packet))\r\n        for record in cached_records:\r\n            assert record.ttl == 1\r\n    \r\n        for entry in zc.cache.async_all_by_details(server_name, const._TYPE_A, const._CLASS_IN):\r\n            if entry.address == fresh_address:\r\n                assert entry.ttl > 1\r\n            else:\r\n                assert entry.ttl == 1\r\n    \r\n        # Wait for the ttl 1 records to expire\r\n        await asyncio.sleep(1.01)\r\n    \r\n        loaded_info = r.ServiceInfo(type_, registration_name)\r\n        loaded_info.load_from_cache(zc)\r\n>       assert loaded_info.addresses == info.addresses\r\nE       AssertionError: assert [b'\\n\\x00\\x01...\\x04\\x04\\x04'] == [b'\\x04\\x04\\x04\\x04']\r\nE         At index 0 diff: b'\\n\\x00\\x01\\x02' != b'\\x04\\x04\\x04\\x04'\r\nE         Left contains 3 more items, first extra item: b'\\n\\x00\\x01\\x05'\r\nE         Full diff:\r\nE         - [b'\\x04\\x04\\x04\\x04']\r\nE         + [b'\\n\\x00\\x01\\x02', b'\\n\\x00\\x01\\x05', b'\\n\\x00\\x01\\x06', b'\\x04\\x04\\x04\\x04']\r\n\r\ntests\\test_handlers.py:915: AssertionError\r\n```","author":{"url":"https://github.com/bdraco","@type":"Person","name":"bdraco"},"datePublished":"2021-06-19T04:11:12Z","url":"https://github.com/python-zeroconf/python-zeroconf/issues/738"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d9872b4a-0ae2-daf8-44fb-4da300ce99cc
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC948:2CAE80:9A4453:D406E5:6B00A673
html-safe-nonce390ca5f5fdb79220291d85f7988189676d31693bd74879b4c0b7fea2ba353344
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTQ4OjJDQUU4MDo5QTQ0NTM6RDQwNkU1OjZCMDBBNjczIiwidmlzaXRvcl9pZCI6IjU5OTkyMTUxOTEzNDA5MTgzODciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac4c50c65cef2df83dd1714181bcc3c3b383c2874efb330dca2afeaac23fb9e5b5
hovercard-subject-tagissue:925310543
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-zeroconf/python-zeroconf/738/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b0378ad84502cd4047bd6190973c6fdd83438d98f659529914bf6859ff7484de/python-zeroconf/python-zeroconf/issues/738
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b0378ad84502cd4047bd6190973c6fdd83438d98f659529914bf6859ff7484de/python-zeroconf/python-zeroconf/issues/738
og:image:alt@pytest.mark.asyncio async def test_cache_flush_bit(): """Test that the cache flush bit sets the TTL to one for matching records.""" # instantiate a zeroconf instance aiozc = AsyncZeroconf(interfac...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebdraco
hostnamegithub.com
expected-hostnamegithub.com
None455b493e3402a3a3a06beac5d20bb7db3da060808b220aa48d6a7eca7c59863a
turbo-cache-controlno-preview
go-importgithub.com/python-zeroconf/python-zeroconf git https://github.com/python-zeroconf/python-zeroconf.git
octolytics-dimension-user_id120192235
octolytics-dimension-user_loginpython-zeroconf
octolytics-dimension-repository_id21548731
octolytics-dimension-repository_nwopython-zeroconf/python-zeroconf
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id21548731
octolytics-dimension-repository_network_root_nwopython-zeroconf/python-zeroconf
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2f575159976167242d488c0b062eb355c4e198b7
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python-zeroconf/python-zeroconf/issues/738#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-zeroconf%2Fpython-zeroconf%2Fissues%2F738
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-zeroconf%2Fpython-zeroconf%2Fissues%2F738
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-zeroconf%2Fpython-zeroconf
Reloadhttps://github.com/python-zeroconf/python-zeroconf/issues/738
Reloadhttps://github.com/python-zeroconf/python-zeroconf/issues/738
Reloadhttps://github.com/python-zeroconf/python-zeroconf/issues/738
python-zeroconfhttps://github.com/python-zeroconf
python-zeroconfhttps://github.com/python-zeroconf/python-zeroconf
Codehttps://github.com/python-zeroconf/python-zeroconf
Issues50 (50)https://github.com/python-zeroconf/python-zeroconf/issues
Pull requests16 (16)https://github.com/python-zeroconf/python-zeroconf/pulls
Discussionshttps://github.com/python-zeroconf/python-zeroconf/discussions
Actionshttps://github.com/python-zeroconf/python-zeroconf/actions
Projectshttps://github.com/python-zeroconf/python-zeroconf/projects
Wikihttps://github.com/python-zeroconf/python-zeroconf/wiki
Security and quality5 (5)https://github.com/python-zeroconf/python-zeroconf/security
Insightshttps://github.com/python-zeroconf/python-zeroconf/insights
https://github.com/python-zeroconf/python-zeroconf
New issuehttps://github.com/login?return_to=https://github.com/python-zeroconf/python-zeroconf/issues/738
New issuehttps://github.com/login?return_to=https://github.com/python-zeroconf/python-zeroconf/issues/738
Cache flush bit test fails because ServiceInfo will use expired records from the cachehttps://github.com/python-zeroconf/python-zeroconf/issues/738#top
bughttps://github.com/python-zeroconf/python-zeroconf/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/bdraco
bdracohttps://github.com/bdraco
on Jun 19, 2021https://github.com/python-zeroconf/python-zeroconf/issues/738#issue-925310543
bdracohttps://github.com/bdraco
bughttps://github.com/python-zeroconf/python-zeroconf/issues?q=state%3Aopen%20label%3A%22bug%22
on Jun 19, 2021https://github.com/python-zeroconf/python-zeroconf/issues/738#event-4912100744
https://github.com/bdraco
bdracohttps://github.com/bdraco
on Jun 19, 2021https://github.com/python-zeroconf/python-zeroconf/issues/738#issuecomment-864352684
https://github.com/bdraco
bdracohttps://github.com/bdraco
on Jun 19, 2021https://github.com/python-zeroconf/python-zeroconf/issues/738#issuecomment-864361562
https://github.com/bdraco
bdracohttps://github.com/bdraco
on Jun 19, 2021https://github.com/python-zeroconf/python-zeroconf/issues/738#issuecomment-864366095
#739https://github.com/python-zeroconf/python-zeroconf/pull/739
bdracohttps://github.com/bdraco
completedhttps://github.com/python-zeroconf/python-zeroconf/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jun 19, 2021https://github.com/python-zeroconf/python-zeroconf/issues/738#event-4912199799
Sign up for freehttps://github.com/signup?return_to=https://github.com/python-zeroconf/python-zeroconf/issues/738
Sign in to commenthttps://github.com/login?return_to=https://github.com/python-zeroconf/python-zeroconf/issues/738
bughttps://github.com/python-zeroconf/python-zeroconf/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.