Skip to content

test(auth_guard): serialize the audit-capturing tests with the ones that emit audit events - #239

Merged
clintcan merged 1 commit into
mainfrom
fix/auth-guard-audit-test-race
Oct 29, 2026
Merged

clintcan merged 1 commit into
mainfrom
fix/auth-guard-audit-test-race

Conversation

@clintcan

Copy link
Copy Markdown
Owner

#233 added a handler test that emits audit events while on_authenticated_emits_auth_audit_event captures them with a scoped subscriber. tracing caches each callsite's enabled state process-wide, so a concurrent registration can leave the capture's success event disabled, and the test fails intermittently (seen on Linux CI on #194).

A test-only lock now keeps the capture tests and the emitting test from overlapping.

Running cargo test -- auth_guard conn_test in a loop on main: without the lock it failed at run 8; with it, 0 failures in 200 runs. fmt (stable and nightly), clippy -D warnings and cargo test pass.

…hat emit audit events

audit-capture tests run. tracing caches a callsite's enabled state
process-wide, so a concurrent registration could leave the capture's
success event disabled (about 1 run in 40 locally, and on Linux CI).
0 failures in 300 runs with the lock.
@clintcan
clintcan merged commit b09d00a into main Oct 29, 2026
3 checks passed
@clintcan
clintcan deleted the fix/auth-guard-audit-test-race branch October 29, 2026 00:09
antonmos added a commit to antonmos/macrdp that referenced this pull request Oct 30, 2026
…ps-switch-cf7eef

* origin/main: (21 commits)
  chore(deps): bump libz-sys 1.1.28 -> 1.1.31 (RUSTSEC-2026-0418) (clintcan#243)
  test(auth_guard): serialize the audit-capturing tests with the ones that emit audit events (clintcan#239)
  docs(readme): explain controller setup and connecting after a reboot (clintcan#238)
  fix(stats): count shipped EGFX frames and clear them when the client leaves (clintcan#218)
  fix(clipboard): keep polling the pasteboard while a format list awaits its answer (clintcan#217)
  fix(input): close the app switcher when stale modifiers are cleared (clintcan#234)
  fix(auth_guard): don't count failures after authentication toward lockout (clintcan#233)
  fix(keyboard_layout): serialize TIS calls so concurrent callers can't abort the process (clintcan#227)
  chore(deps): bump zstd-safe to 8.2 in the vendored ironrdp-server (clintcan#224)
  fix(server): read input while a write blocks, and disable Nagle (clintcan#222)
  fix(capture): apply --max-client-size to the connect-time size too (clintcan#216)
  feat: read the password from a file with --password-file (clintcan#212)
  fix(input): drop the scroll backlog the 5-line cap leaves behind (clintcan#210)
  fix(input): post each modifier change once (clintcan#208)
  docs: fold hard-won dev lessons into CLAUDE.md and the topic docs (clintcan#202)
  fix(capture): mirror the main display on a multi-monitor Mac (clintcan#215)
  docs(readme): add the Homebrew cask install (clintcan#214)
  feat(input): add --alt-space-spotlight (clintcan#209)
  perf(capture): retain the flush frame's pixel buffer instead of copying it (clintcan#203)
  test(input): pure resync_plan + tests for the connection-edge reset (clintcan#192)
  ...

# Conflicts:
#	README.md
#	docs/configuration.md
#	docs/features.md
#	packaging/config.env.example
#	src/input.rs
#	src/main.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant