allthingssecurity commented on PR #30306: URL: https://github.com/apache/camel/pull/30306#issuecomment-6972907689
Thanks Claus, good catch on the restart. - **[Important] stop/start in place:** fixed in e61cd04. `reconnectService` is now volatile and `doStart` creates a new one when the stop shut the previous one down, in both `SmppConsumer` and `SmppProducer`. I kept the one created in the constructor, so a consumer that is never stopped is unchanged and the existing unit tests that read the field before `doStart` still work. `consumerStoppedAndStartedInPlaceStillReconnects` and `producerStoppedAndStartedInPlaceStillReconnects` start, stop and start the same instance against the jsmpp SMSC, close the session on the SMSC side, and expect a new bind. Without the change no reconnect happens (the task is dropped by the shut down pool). - **[Suggestion]** `SmppStopDuringReconnectTest` now also checks that the task registry is empty after the stop. - **[Nit] binary signature of `SmppUtils.newReconnectTask`:** right, the return type changed from `BlockingTask` to `BackgroundTask` (a subtype). `SmppUtils` is a helper of the component and I don't think it is called from outside, so I'd keep it. Happy to add a line to the upgrade guide if you prefer. Targeted runs: the camel-smpp tests pass (177 run, 0 failures, 4 skipped), and `SmppStopDuringReconnectTest` passes 10 times in one JVM (40/40). With the two main files reverted, the two new tests fail (no new bind within 10 s). _Claude Code on behalf of allthingssecurity_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
