proxygen
EvbHandshakeHelperTest Class Reference
Inheritance diagram for EvbHandshakeHelperTest:
testing::Test

Protected Member Functions

void SetUp () override
 
void TearDown () override
 
- Protected Member Functions inherited from testing::Test
 Test ()
 
 Test ()
 
 Test ()
 

Protected Attributes

ScopedEventBaseThread original_
 
ScopedEventBaseThread alternate_
 
std::atomic< std::thread::id > originalThreadId_
 
std::atomic< std::thread::id > alternateThreadId_
 
EvbHandshakeHelperevbHelper_ {nullptr}
 
MockHandshakeHelper< UseOwnedRawPtrPolicy > * mockHelper_ {nullptr}
 
MockHandshakeHelperCallback< UseOwnedRawPtrPolicymockCb_
 
MockAsyncSSLSocketsslSock_ {nullptr}
 
AsyncSSLSocket::UniquePtr sockPtr_ {nullptr}
 

Additional Inherited Members

- Public Types inherited from testing::Test
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
- Public Member Functions inherited from testing::Test
virtual ~Test ()
 
virtual ~Test ()
 
virtual ~Test ()
 
- Static Public Member Functions inherited from testing::Test
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 

Detailed Description

Definition at line 36 of file EvbHandshakeHelperTest.cpp.

Member Function Documentation

void EvbHandshakeHelperTest::SetUp ( )
inlineoverrideprotectedvirtual

Reimplemented from testing::Test.

Definition at line 38 of file EvbHandshakeHelperTest.cpp.

38  {
40  originalThreadId_ = std::this_thread::get_id();
41  auto evb = original_.getEventBase();
42  auto sslSock =
43  new MockAsyncSSLSocket(std::make_shared<SSLContext>(), evb, true);
44 
45  sslSock_ = sslSock;
46  sockPtr_.reset(sslSock);
47  });
48 
50  [=] { alternateThreadId_ = std::this_thread::get_id(); });
51 
53 
57  }
AsyncSSLSocket::UniquePtr sockPtr_
ScopedEventBaseThread original_
bool runInEventBaseThreadAndWait(void(*fn)(T *), T *arg)
Definition: EventBase.h:799
std::atomic< std::thread::id > alternateThreadId_
std::atomic< std::thread::id > originalThreadId_
MockAsyncSSLSocket * sslSock_
MockHandshakeHelper< UseOwnedRawPtrPolicy > * mockHelper_
EvbHandshakeHelper * evbHelper_
std::unique_ptr< AcceptorHandshakeHelper, folly::DelayedDestruction::Destructor > UniquePtr
ScopedEventBaseThread alternate_
void EvbHandshakeHelperTest::TearDown ( )
inlineoverrideprotectedvirtual

Reimplemented from testing::Test.

Definition at line 59 of file EvbHandshakeHelperTest.cpp.

59  {
60  if (evbHelper_) {
62  }
63  }
EvbHandshakeHelper * evbHelper_

Member Data Documentation

ScopedEventBaseThread EvbHandshakeHelperTest::alternate_
protected

Definition at line 66 of file EvbHandshakeHelperTest.cpp.

std::atomic<std::thread::id> EvbHandshakeHelperTest::alternateThreadId_
protected

Definition at line 69 of file EvbHandshakeHelperTest.cpp.

EvbHandshakeHelper* EvbHandshakeHelperTest::evbHelper_ {nullptr}
protected

Definition at line 71 of file EvbHandshakeHelperTest.cpp.

MockHandshakeHelperCallback<UseOwnedRawPtrPolicy> EvbHandshakeHelperTest::mockCb_
protected

Definition at line 74 of file EvbHandshakeHelperTest.cpp.

MockHandshakeHelper<UseOwnedRawPtrPolicy>* EvbHandshakeHelperTest::mockHelper_ {nullptr}
protected

Definition at line 72 of file EvbHandshakeHelperTest.cpp.

ScopedEventBaseThread EvbHandshakeHelperTest::original_
protected

Definition at line 65 of file EvbHandshakeHelperTest.cpp.

std::atomic<std::thread::id> EvbHandshakeHelperTest::originalThreadId_
protected

Definition at line 68 of file EvbHandshakeHelperTest.cpp.

AsyncSSLSocket::UniquePtr EvbHandshakeHelperTest::sockPtr_ {nullptr}
protected

Definition at line 77 of file EvbHandshakeHelperTest.cpp.

MockAsyncSSLSocket* EvbHandshakeHelperTest::sslSock_ {nullptr}
protected

Definition at line 76 of file EvbHandshakeHelperTest.cpp.


The documentation for this class was generated from the following file: