Skip to content

tests: TlsAbortTests no longer disposes the semaphore its last handler releases - #727

Merged
MDA2AV merged 2 commits into
mainfrom
tests/tls-abort-semaphore
Dec 6, 2026
Merged

MDA2AV merged 2 commits into
mainfrom
tests/tls-abort-semaphore

Conversation

@MDA2AV

@MDA2AV MDA2AV commented Dec 4, 2026

Copy link
Copy Markdown
Owner

TlsAbortTests (#725) made its ended semaphore with using, so it was disposed when the test body ended. The second client is closed just before that, and its handler's finally releases ended after the semaphore is gone. Every Tls run logged it as a handler fault, right after the test's PASS:

[r0] connection handler faulted: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Threading.SemaphoreSlim'.

The test passed, but a stray fault in the log makes a real one easier to miss. The semaphore is no longer disposed.

Tests

  • Tls (no kernel tls module on this host, so the kTLS cases skip): 242 passed, 82 skipped, as on main. Main's run logs the fault once; with this change it is gone, and the other 91 handler faults in the log are all made on purpose (failed handshakes and the harness's probe), as on main.

Test code only.

Overlap

None of the open PRs touches TlsAbortTests.cs.

…r releases

The second client's handler releases `ended` after the test body has ended, so every Tls run logged an
ObjectDisposedException handler fault.
@MDA2AV
MDA2AV merged commit a18ad51 into main Dec 6, 2026
2 checks passed
@MDA2AV
MDA2AV deleted the tests/tls-abort-semaphore branch December 6, 2026 00:47
@MDA2AV MDA2AV mentioned this pull request Dec 6, 2026
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