test :- add test for subscriber queue size behavior (Fixes #421) #3299
All Vouch review confidence checks passed
Residual risk 0.12 = Change Risk (0.31) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.31 · 114 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.289
Diff Size
diff_size
0.284
Real PR Conversation Timeline
1 comments
"Review active on #3299"
general
weight: 0.35
fgallegosalido
Description
This PR adds a missing test in
test_subscription.cppto verify the behavior of a subscriber when its queue size (depth) is reached.It ensures that when a publisher rapidly publishes more messages than the subscriber's configured queue size (with
KEEP_LASThistory), the subscriber's RMW queue correctly behaves according to QoS settings and delivers only up todepthnumber of messages.Fixes #421
Is this user-facing behavior change?
No. This only adds a new test to the test suite to improve coverage.
Did you use Generative AI?
yes for testing the structure
Additional Information
The new test
queue_size_behaviorusestest_msgs::msg::BasicTypes. It sets up a subscriber with a queue depth of 3, waits for discovery, rapidly publishes 5 messages, and then spins to verify that the subscriber correctly receives exactly 3 messages without overflowing.