pjfanning opened a new pull request, #2016: URL: https://github.com/apache/pekko-connectors/pull/2016
### Motivation [akka/alpakka#3023](https://github.com/akka/alpakka/issues/3023) reported that `AmqpCachedConnectionProvider` kept handing out a closed connection after the server forced it closed, because the underlying connection was held in a `lazy val`. Pekko Connectors already obtains a fresh connection on each `Empty -> Connecting` transition (`getRecursive`), but nothing tests that behaviour. ### Modification Add the regression test from [akka/alpakka#3025](https://github.com/akka/alpakka/pull/3025), which is Apache licensed. It aborts the cached connection, releases it, and checks that the next `get` returns a new open connection. The new connection is also released at the end. Existing headers are unchanged. ### Result A regression to caching the underlying connection would be caught. ### Tests - `docker compose up -d amqp` - `sbt "amqp/Test/testOnly org.apache.pekko.stream.connectors.amqp.scaladsl.AmqpConnectionProvidersSpec"`: 18 passed - `sbt scalafmtAll` - Not shown failing first: the production fix is already present in this repo ### References Refs akka/alpakka#3023, akka/alpakka#3025 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
