34 AsyncSocketException::AsyncSocketExceptionType::NOT_OPEN,
38 AsyncSocketException::AsyncSocketExceptionType::NOT_OPEN, ex1.
getType());
41 "AsyncSocketException: test exception 1, type = Socket not open",
45 AsyncSocketException::AsyncSocketExceptionType::BAD_ARGS,
50 AsyncSocketException::AsyncSocketExceptionType::BAD_ARGS, ex2.
getType());
53 "AsyncSocketException: test exception 2, type = Invalid arguments, " 55 to<std::string>(ECONNREFUSED) +
" (Connection refused)",
67 EXPECT_EQ(netEof.getType(), AsyncSocketException::END_OF_FILE);
70 EXPECT_EQ(netOther.getType(), AsyncSocketException::NETWORK_ERROR);
72 std::array<int, 6> sslErrs{{SSL_ERROR_SSL,
75 SSL_ERROR_WANT_X509_LOOKUP,
76 SSL_ERROR_WANT_CONNECT,
77 SSL_ERROR_WANT_ACCEPT}};
79 for (
auto& e : sslErrs) {
90 EXPECT_EQ(net.getType(), AsyncSocketException::NETWORK_ERROR);
92 std::array<SSLError, 4> errs{{SSLError::CLIENT_RENEGOTIATION,
93 SSLError::INVALID_RENEGOTIATION,
94 SSLError::EARLY_WRITE,
95 SSLError::SSL_ERROR}};
97 for (
auto& e : errs) {
int getErrno() const noexcept
#define EXPECT_EQ(val1, val2)
—— Concurrent Priority Queue Implementation ——
TEST(GTestEnvVarTest, Dummy)
void SimpleTest(std::shared_ptr< folly::Executor > const &parent)
AsyncSocketExceptionType getType() const noexcept