René's URL Explorer Experiment


Title: test: use the virtual-time harness to remove long retry waits · Issue #409 · jangala-dev/devicecode-lua · GitHub

Open Graph Title: test: use the virtual-time harness to remove long retry waits · Issue #409 · jangala-dev/devicecode-lua

X Title: test: use the virtual-time harness to remove long retry waits · Issue #409 · jangala-dev/devicecode-lua

Description: The test suite spends most of its elapsed time waiting for real retry and backoff timers. Now that the runner reports OS monotonic elapsed time rather than CPU time, these waits are visible. In a full run of 1,707 tests, five tests in te...

Open Graph Description: The test suite spends most of its elapsed time waiting for real retry and backoff timers. Now that the runner reports OS monotonic elapsed time rather than CPU time, these waits are visible. In a f...

X Description: The test suite spends most of its elapsed time waiting for real retry and backoff timers. Now that the runner reports OS monotonic elapsed time rather than CPU time, these waits are visible. In a f...

Opengraph URL: https://github.com/jangala-dev/devicecode-lua/issues/409

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test: use the virtual-time harness to remove long retry waits","articleBody":"The test suite spends most of its elapsed time waiting for real retry and backoff timers. Now that the runner reports OS monotonic elapsed time rather than CPU time, these waits are visible.\n\nIn a full run of 1,707 tests, five tests in `tests/unit/gsm/test_modes.lua` consumed **170.5 seconds**, approximately 72% of the 237 seconds accounted for by complete timed result lines. The run had one expected failure from an uncommitted PDP regression; these five tests all passed. Fifteen result lines could not be timed from the capture because output was interleaved, so 237 seconds is not an exact overall runtime.\n\n## Highest-impact candidates\n\n| Test in `unit.gsm.test_modes` | Measured elapsed time |\n| --- | ---: |\n| `state_event_recovery_preserves_and_resumes_the_apn_retry_deadline` | 50.181s |\n| `expired_apn_retry_waits_for_failed_mode_state_refresh_to_recover` | 40.112s |\n| `state_refresh_recovery_preserves_a_future_apn_retry_deadline` | 40.111s |\n| `state_refresh_recovery_connects_without_an_apn_retry_deadline` | 20.071s |\n| `mode_retry_does_not_preempt_apn_backoff` | 20.062s |\n\nThese tests explicitly call `sleep.sleep(20.05)`, `sleep.sleep(30.05)`, and similar waits. They were introduced in #347 (`455d478`).\n\n## Proposed change\n\nUse the existing `tests/support/virtual_time.lua` clock together with `tests/support/time_harness.lua` to advance simulated time and give fibers bounded scheduling turns instead of waiting for real seconds.\n\n- Install and reliably restore the virtual clock around each relevant test.\n- Advance to meaningful retry/backoff boundaries, allowing runnable fibers to settle between advances.\n- Preserve assertions that recovery does not preempt an APN cooldown, that the original deadline is retained, and that connecting resumes when that deadline is reached. Check behaviour immediately before and after the boundary where appropriate.\n- Keep test-duration reporting on the OS monotonic clock, independent of simulated fiber time (see branch `fix/test_durations`, commit `e4fc12a`).\n- Avoid merely shortening production retry constants or removing waits/assertions: retain coverage of the actual configured deadlines.\n\n## Other candidates to investigate\n\n| Test | Measured elapsed time |\n| --- | ---: |\n| `unit.hal.openwrt_speedtest_spec :: test_worker_deadline_shuts_down_stalled_process` | 9.810s |\n| `unit.gsm.test_apn_legacy_import_service :: test_import_waits_for_the_store_to_answer` | 3.024s |\n| `unit.hal.modem_pdp_spec :: test_pdp_setter_verifies_silent_timeout` | 3.004s |\n| `unit.net.test_service_behaviour :: test_failure_retry_is_not_lost_behind_an_earlier_interval_timer` | 2.335s |\n| `unit.net.test_service_behaviour :: test_raising_interval_rearms_the_timer_for_the_cached_result` | 2.033s |\n| `unit.net.test_service_behaviour :: test_active_scope_interval_timer_follows_the_latest_result` | 2.026s |\n\nThe APN and network timer tests are plausible harness candidates. Inspect tests involving real subprocesses or external I/O separately: retain bounded real-time integration coverage where virtual fiber time cannot drive the underlying operation.\n\n## Validation\n\n- Run the converted tests individually and as part of the full suite to catch virtual-clock leaks.\n- Confirm existing deadline/recovery assertions still pass and regression detection is retained.\n- Compare elapsed durations before and after; the five GSM tests should no longer spend roughly 170 seconds in real waits.\n","author":{"url":"https://github.com/rslater-cs","@type":"Person","name":"rslater-cs"},"datePublished":"2026-11-12T15:35:43Z","url":"https://github.com/jangala-dev/devicecode-lua/issues/409"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e8b8bcaf-9e19-636a-486e-e29506c28d62
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE4DA:29D7A5:15E7F40:1CD4BA9:6AF89A9D
html-safe-nonce685fdff42cd29799f1de97e46c6ac6af2bee8e01f7b74bc48747f9b2b9c2bc41
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNERBOjI5RDdBNToxNUU3RjQwOjFDRDRCQTk6NkFGODlBOUQiLCJ2aXNpdG9yX2lkIjoiMTM2NTc3NTIyMjY2MDUzMjc3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmace67fc38881d8e656cd56f4cf2d05a9eca6256fb94c4ffb308e95dafb174e8a8c
hovercard-subject-tagissue:6353258836
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/jangala-dev/devicecode-lua/409/issue_layout
twitter:imagehttps://opengraph.githubassets.com/771d27db3e999db0a49abf82dd23910622069d4925b2c172b25f0ed4d3523474/jangala-dev/devicecode-lua/issues/409
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/771d27db3e999db0a49abf82dd23910622069d4925b2c172b25f0ed4d3523474/jangala-dev/devicecode-lua/issues/409
og:image:altThe test suite spends most of its elapsed time waiting for real retry and backoff timers. Now that the runner reports OS monotonic elapsed time rather than CPU time, these waits are visible. In a f...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerslater-cs
hostnamegithub.com
expected-hostnamegithub.com
None612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7
turbo-cache-controlno-preview
go-importgithub.com/jangala-dev/devicecode-lua git https://github.com/jangala-dev/devicecode-lua.git
octolytics-dimension-user_id44901909
octolytics-dimension-user_loginjangala-dev
octolytics-dimension-repository_id814022112
octolytics-dimension-repository_nwojangala-dev/devicecode-lua
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id814022112
octolytics-dimension-repository_network_root_nwojangala-dev/devicecode-lua
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
release072e34035c13c31543fba9f025cbbbda4210dae4
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/jangala-dev/devicecode-lua/issues/409#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjangala-dev%2Fdevicecode-lua%2Fissues%2F409
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%2Fjangala-dev%2Fdevicecode-lua%2Fissues%2F409
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=jangala-dev%2Fdevicecode-lua
Reloadhttps://github.com/jangala-dev/devicecode-lua/issues/409
Reloadhttps://github.com/jangala-dev/devicecode-lua/issues/409
Reloadhttps://github.com/jangala-dev/devicecode-lua/issues/409
jangala-devhttps://github.com/jangala-dev
devicecode-luahttps://github.com/jangala-dev/devicecode-lua
Codehttps://github.com/jangala-dev/devicecode-lua
Issues23 (23)https://github.com/jangala-dev/devicecode-lua/issues
Pull requests2 (2)https://github.com/jangala-dev/devicecode-lua/pulls
Discussionshttps://github.com/jangala-dev/devicecode-lua/discussions
Actionshttps://github.com/jangala-dev/devicecode-lua/actions
Projectshttps://github.com/jangala-dev/devicecode-lua/projects
Security and qualityhttps://github.com/jangala-dev/devicecode-lua/security
Insightshttps://github.com/jangala-dev/devicecode-lua/pulse
https://github.com/jangala-dev/devicecode-lua
New issuehttps://github.com/login?return_to=https://github.com/jangala-dev/devicecode-lua/issues/409
New issuehttps://github.com/login?return_to=https://github.com/jangala-dev/devicecode-lua/issues/409
test: use the virtual-time harness to remove long retry waitshttps://github.com/jangala-dev/devicecode-lua/issues/409#top
https://github.com/rslater-cs
0.12Targets the 0.12 releasehttps://github.com/jangala-dev/devicecode-lua/issues?q=state%3Aopen%20label%3A%220.12%22
https://github.com/rslater-cs
rslater-cshttps://github.com/rslater-cs
on Nov 12, 2026https://github.com/jangala-dev/devicecode-lua/issues/409#issue-6353258836
#347https://github.com/jangala-dev/devicecode-lua/pull/347
cpunthttps://github.com/cpunt
0.12Targets the 0.12 releasehttps://github.com/jangala-dev/devicecode-lua/issues?q=state%3Aopen%20label%3A%220.12%22
on Nov 12, 2026https://github.com/jangala-dev/devicecode-lua/issues/409#event-35940395916
rslater-cshttps://github.com/rslater-cs
on Nov 13, 2026https://github.com/jangala-dev/devicecode-lua/issues/409#event-36025610122
Sign up for freehttps://github.com/signup?return_to=https://github.com/jangala-dev/devicecode-lua/issues/409
Sign in to commenthttps://github.com/login?return_to=https://github.com/jangala-dev/devicecode-lua/issues/409
rslater-cshttps://github.com/rslater-cs
0.12Targets the 0.12 releasehttps://github.com/jangala-dev/devicecode-lua/issues?q=state%3Aopen%20label%3A%220.12%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.