OpcUaClient: residuals of the #763 stale-BadNoSubscription grace window (slow deletes, PublishError noise, wire-test delays) #764
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Residuals from #763 (fixed with a 5 s grace window for anonymous
BadNoSubscription):BadNoSubscriptioncan still fall outside the window and trigger a false loss. ARepublish/subscription-state probe would close it, at the cost of async network calls in the error handler — only worth doing if it is observed.BadNoSubscription, which inflates the PublishError counter with noise. Consider not counting id-0 BadNoSubscription when nothing is tracked.Partly fixed on master
90db63cf: an anonymous BadNoSubscription returned while the driver tracks no subscription is no longer counted as publish_error (everything else counted/handled as before). 2 new OpcUaClientIdlePublishErrorTests with positive controls; the idle-session one fails without the fix. Remaining (keep open): the slow-delete (>5 s) probe and the #728 wire test's fixed delays.Wire-test delays removed on master (
5eaa561b-equivalent, pushed with the #770 commit):A_condition_already_active_before_subscribe_is_reported_by_ConditionRefreshdrops Task.Delay(1500)/(500) for a trailing 'barrier' event polled with the rig's 10 s ceiling, and asserts the exact sequence [Acknowledge, Unspecified] (stricter than before). 5/5 consecutive runs pass at AKKA_TEST_TIMEFACTOR=3; OpcUaServer.IntegrationTests 132/132.Remaining: the >5 s slow-delete Republish probe — by design only worth doing if a late id-0 BadNoSubscription is ever observed. Keeping open for that.
Slow-delete residual closed on master
70050c9d. The driver already restamps the grace window when the delete COMPLETES (NoteSubscriptionDeleted(force:true) in the finally of both unsubscribe paths), so a delete slower than 5 s cannot expire the window early; no Republish probe is needed. What was missing was proof: both Unsubscribe paths now delete through the existing DeleteSubscriptionAsync seam, and OpcUaClientSlowDeleteTests holds the delete open 30 s (manual clock) for data and alarm subscriptions, then resubscribes and raises the stale id-0 BadNoSubscription: no ConnectionLost, health Healthy. Positive control: after completion the grace still expires (loss declared). Mutation: removing the post-delete restamp fails both slow-delete tests. With the earlier items (idle PublishError noise90db63cf, wire-test delays) nothing remains. Evidence: Release build 0 warnings; AKKA_TEST_TIMEFACTOR=3: Driver.OpcUaClient.Tests 298/298, IntegrationTests 5/5, OpcUaServer.IntegrationTests 133/133.