Skip to content

test: verify reconnect policy without exact OS timer assumption - #1601

Merged
zackees merged 2 commits into
masterfrom
test/1598-reconnect-timing-contract
Oct 21, 2026
Merged

zackees merged 2 commits into
masterfrom
test/1598-reconnect-timing-contract

Conversation

@zackees

@zackees zackees commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #1598. Repair the output-delay reconnect test's Windows timer assumption. No production implementation, Rust port, timing setting or queue behavior changes.

RED 915566a compiles the actual reconnect/preserve case: a valid requested two-second retry measured at 1,999,999,999 ns falsely fails, and incorrect reported timeout values are accepted. Three failures across two focused tests.

GREEN be053d7 captures the reconnect signal's timeout_sec under the existing record mutex, asserts exactly one reconnect signal requesting two seconds, and prints the requested timeout, elapsed nanoseconds and signal count. The invalid exact OS elapsed-time assertion is replaced. Every other existing assertion and test registration is unchanged (49 of 50 existing assertion/registration expressions retained, plus two exact signal assertions). Production timers and existing queue/packet/delay/stop checks are unchanged.

Windows relative timers can expire within one system clock tick of their nominal deadline: Microsoft Timer Accuracy. This change checks OBS's timeout policy directly and leaves queue retention/delay growth verified end to end; it adds no arbitrary clock tolerance, sleeps or retries.

Validation

  • Four focused reconnect/diagnostic tests pass. Actual production test body runs with injected clocks; cases cover before/at/after the nominal deadline, wrong reported timeout 0/1/3, and five deliberately bad queue/start/stop/delay snapshots that must fail.
  • Actual on_reconnect callback is compiled into the fixture and receives the injected signal payload.
  • Pinned clang-format and whitespace checks pass.
  • PR CI 39544716923 covers Linux Tier 2. Explicit full validation 39544953077 supplies native Windows/macOS Tier 2 because plain C test paths are Linux-only in PR scope. Native Windows and Linux output-delay execution is verified. Remaining full-run app/package jobs are still active at queue submission.

This is an explicit test repair, not modification of a C test to accommodate a Rust port. No public header, exported API, workflow file, WebSocket code/gitlink or user-visible behavior is changed. Rust Tier 1/3 and protocol Tier 4 do not apply; real Tier 2 coverage is required before completion.

Native results

PR CI 39544716923 passed. Linux output-delay passes C OFF 9.59 s and Rust ON 9.60 s; all four shards pass. Native Windows Tier 2 job 119041878897 passes all 167 tests per backend, including output-delay OFF 9.55 s and ON 9.54 s. This verifies the new signal assertions and existing queue/packet checks against both real libraries. No retry was needed.

@zackees
zackees marked this pull request as ready for review October 21, 2026 04:47
@zackees
zackees added this pull request to the merge queue Oct 21, 2026
Merged via the queue into master with commit c9b06b3 Oct 21, 2026
55 checks passed
@zackees
zackees deleted the test/1598-reconnect-timing-contract branch October 26, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

test: Windows output-delay reconnect assertion intermittently fails exact 2 s lower bound

1 participant