bloomberg / amqpprox

An AMQP 0.9.1 proxy server, designed for use in front of an AMQP 0.9.1 compliant message queue broker such as RabbitMQ.
Apache License 2.0
78 stars 16 forks source link

Start unit testing MaybeSecureSocketAdaptor #93

Closed adamncasey closed 2 years ago

adamncasey commented 2 years ago

This commit changes MaybeSecureSocketAdaptor to template a few critical types which allows us to write unit tests against some of it's behaviours

In theory this could probably also replace the SocketIntercept things, which were a nice solution when the implementation of this class passed straight through to the asio types. I didn't look into what we'd need to do to replace that just yet.

Since working around some asio bugs https://github.com/bloomberg/amqpprox/pull/69 and adding support for data rate limits https://github.com/bloomberg/amqpprox/pull/88 the MaybeSecureSocketAdaptor class has expanded enough that we should be writing unit tests for it - and probably should have done so before now.