Made unit tests stable
This commit is contained in:
parent
58f72bc8b6
commit
e8799383f3
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user