etzel-mes commented on PR #28387:
URL: https://github.com/apache/camel/pull/28387#issuecomment-6414791666
Thanks @davsclaus, all three are in 712fa4a9a95b6f760ee49a646a844f5d97cd5a79.
- `setupConnection()` now keeps a connection that is still connected and
closes and replaces only a lost one, inside the lock as you suggested.
`stopsReadingWhenTheRouteStopsAndResumesWithoutDuplicatesAfterARestart` asserts
`MockDriver.connectionStrings()` has size 1 after the restart; with the guard
removed it fails with 2.
- `doStop()` now always closes and clears the connection. Since that helper
now also closes a live connection, I renamed `closeLostConnection()` to
`closeConnection()`. `Plc4XEndpointTest.doStopClosesALostConnection` replaces
the old test that asserted a disconnected connection is left alone, and its
`close()` throws to show the stop still succeeds.
- `buildPlcReadRequest(Map)` reads the field once and throws
`PlcConnectionException("Cannot establish connection")` when it is null, so
both overloads now declare it. The duplicate null checks in `Plc4XConsumer`,
`Plc4XPollingConsumer` and `Plc4XTriggeredConsumer` are gone, and so are the
mock connections `Plc4XFailureTest` set only to get past them.
Module build with tests and `-Psourcecheck`: 37 tests, 0 failures.
_Claude Code on behalf of etzel-mes_
--
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]