Skip to content

test: count own-message allocations on the receiving thread - #375

Merged
cosmin-staicu merged 1 commit into
mainfrom
test/own-message-alloc-thread
Nov 6, 2026
Merged

cosmin-staicu merged 1 commit into
mainfrom
test/own-message-alloc-thread

Conversation

@cosmin-staicu

Copy link
Copy Markdown
Member

Summary

RedisPubSubOwnMessageAllocationTests summed allocations across the whole process, so other threads on a busy runner counted against the own-message bound. Receive runs synchronously on the test thread, so the test now counts that thread only, as the repo's other allocation tests do.

-var before = GC.GetTotalAllocatedBytes(precise: true);
+var before = GC.GetAllocatedBytesForCurrentThread();

Evidence

Merge Danger

Door: two-way

Blast Radius: one test file.

The test summed allocations across the process, so a busy runner's background threads pushed the own-message cost past its 16-byte bound (41 bytes on a Linux CI run). Receive runs on the test thread, so count that thread only, as the other allocation tests do.

Signed-off-by: Cosmin Staicu <cosmin.staicu@uipath.com>
@sonarqubecloud

sonarqubecloud Bot commented Nov 5, 2026

Copy link
Copy Markdown

@cosmin-staicu
cosmin-staicu merged commit 889f26f into main Nov 6, 2026
11 checks passed
@cosmin-staicu
cosmin-staicu deleted the test/own-message-alloc-thread branch November 6, 2026 06:56
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.

2 participants