From 32bda0835a1d1e8dfeeb1b5c06ca7f43a9f04f9c Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Sat, 29 Jun 2024 16:25:04 +0800 Subject: [PATCH] feat use baidu.com for test --- tile/net/http/http_client_test.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tile/net/http/http_client_test.cc b/tile/net/http/http_client_test.cc index 9a8fef3..fa56d23 100644 --- a/tile/net/http/http_client_test.cc +++ b/tile/net/http/http_client_test.cc @@ -24,7 +24,7 @@ Get(const std::string &url, std::chrono::nanoseconds timeout = 20 * one_s) { bool IsWanAccessible() { static const auto kResult = /*!!Get("http://baidu.com") && !!Get("http://qq.com") &&*/ - !!Get("http://example.com"); + !!Get("http://www.baidu.com"); return kResult; } @@ -43,7 +43,7 @@ TEST(HttpClient, TestDomain) { TILE_LOG_INFO("WAN is not accessible, skip this test"); return; } - auto resp = Get("http://example.com"); + auto resp = Get("http://www.baidu.com"); ASSERT_TRUE(resp); EXPECT_EQ(HttpStatus(200), resp->status()); } @@ -53,7 +53,7 @@ TEST(HttpClient, TestNotFound) { TILE_LOG_INFO("WAN is not accessible, skip this test"); return; } - auto resp = Get("http://example.com/404"); + auto resp = Get("http://www.baidu.com/404"); ASSERT_TRUE(resp); EXPECT_EQ(HttpStatus(404), resp->status()); }