Summary:
Even though MockAsyncSSLSocket's initializes AsyncSSLSocket, which should
initialize AsyncSocket, this does not actually happen because AsyncSSLSocket
virtually inherits from AsyncSocket.
Because of this, prior to this diff, the MockAsyncSSLSocket was not properly
setting its EventBase.
Reviewed By: knekritz
Differential Revision:
D5676596
fbshipit-source-id:
5f3c0e848179cb5eb4d2dc4921a11e7c04d7c0e0
class MockAsyncSSLSocket : public AsyncSSLSocket {
public:
MockAsyncSSLSocket(
- const std::shared_ptr<SSLContext>& ctx,
- EventBase* base,
- bool deferSecurityNegotiation = false) :
- AsyncSSLSocket(ctx, base, deferSecurityNegotiation) {
- }
+ const std::shared_ptr<SSLContext>& ctx,
+ EventBase* base,
+ bool deferSecurityNegotiation = false)
+ : AsyncSocket(base),
+ AsyncSSLSocket(ctx, base, deferSecurityNegotiation) {}
GMOCK_METHOD5_(, noexcept, ,
connect,