1
0
mirror of synced 2025-04-26 14:28:51 +03:00

Made unit tests stable

This commit is contained in:
yhirose 2019-07-30 01:51:53 +00:00
parent 58f72bc8b6
commit e8799383f3

View File

@ -1466,6 +1466,7 @@ TEST(SSLClientServerTest, ClientCertPresent) {
});
thread t = thread([&]() { ASSERT_TRUE(svr.listen(HOST, PORT)); });
msleep(1);
httplib::SSLClient cli(HOST, PORT, 30, CLIENT_CERT_FILE,
CLIENT_PRIVATE_KEY_FILE);
@ -1484,6 +1485,7 @@ TEST(SSLClientServerTest, ClientCertMissing) {
svr.Get("/test", [&](const Request &, Response &) { ASSERT_TRUE(false); });
thread t = thread([&]() { ASSERT_TRUE(svr.listen(HOST, PORT)); });
msleep(1);
httplib::SSLClient cli(HOST, PORT, 30);
auto res = cli.Get("/test");
@ -1504,6 +1506,7 @@ TEST(SSLClientServerTest, TrustDirOptional) {
});
thread t = thread([&]() { ASSERT_TRUE(svr.listen(HOST, PORT)); });
msleep(1);
httplib::SSLClient cli(HOST, PORT, 30, CLIENT_CERT_FILE,
CLIENT_PRIVATE_KEY_FILE);