mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-14 16:58:30 +00:00
Remome 'global timeout' to 'max timeout'
This commit is contained in:
parent
8a7c536ad5
commit
8e22a7676a
3 changed files with 52 additions and 49 deletions
|
@ -8194,7 +8194,7 @@ TEST(Expect100ContinueTest, ServerClosesConnection) {
|
|||
}
|
||||
#endif
|
||||
|
||||
TEST(GlobalTimeoutTest, ContentStream) {
|
||||
TEST(MaxTimeoutTest, ContentStream) {
|
||||
Server svr;
|
||||
|
||||
svr.Get("/stream", [&](const Request &, Response &res) {
|
||||
|
@ -8270,7 +8270,7 @@ TEST(GlobalTimeoutTest, ContentStream) {
|
|||
const time_t threshold = 200;
|
||||
|
||||
Client cli("localhost", PORT);
|
||||
cli.set_global_timeout(std::chrono::milliseconds(timeout));
|
||||
cli.set_max_timeout(std::chrono::milliseconds(timeout));
|
||||
|
||||
|
||||
{
|
||||
|
@ -8320,7 +8320,7 @@ TEST(GlobalTimeoutTest, ContentStream) {
|
|||
}
|
||||
|
||||
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
|
||||
TEST(GlobalTimeoutTest, ContentStreamSSL) {
|
||||
TEST(MaxTimeoutTest, ContentStreamSSL) {
|
||||
SSLServer svr(SERVER_CERT_FILE, SERVER_PRIVATE_KEY_FILE);
|
||||
|
||||
svr.Get("/stream", [&](const Request &, Response &res) {
|
||||
|
@ -8397,7 +8397,7 @@ TEST(GlobalTimeoutTest, ContentStreamSSL) {
|
|||
|
||||
SSLClient cli("localhost", PORT);
|
||||
cli.enable_server_certificate_verification(false);
|
||||
cli.set_global_timeout(std::chrono::milliseconds(timeout));
|
||||
cli.set_max_timeout(std::chrono::milliseconds(timeout));
|
||||
|
||||
{
|
||||
auto start = std::chrono::steady_clock::now();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue