feat use baidu.com for test
All checks were successful
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Debug) (push) Successful in 1m26s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Release) (push) Successful in 1m49s
linux-arm-gcc / linux-gcc-arm (Debug) (push) Successful in 1m42s
linux-arm-gcc / linux-gcc-arm (Release) (push) Successful in 2m3s
linux-arm-gcc / linux-gcc-armhf (Debug) (push) Successful in 1m54s
linux-arm-gcc / linux-gcc-armhf (Release) (push) Successful in 1m48s
linux-mips-gcc / linux-gcc-mipsel (Debug) (push) Successful in 1m27s
linux-mips-gcc / linux-gcc-mipsel (Release) (push) Successful in 1m35s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Successful in 1m28s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Successful in 1m37s
linux-riscv64-gcc / linux-gcc-riscv64 (Debug) (push) Successful in 3m7s
linux-riscv64-gcc / linux-gcc-riscv64 (Release) (push) Successful in 1m55s
linux-x64-gcc / linux-gcc (Debug) (push) Successful in 2m18s
linux-x64-gcc / linux-gcc (Release) (push) Successful in 2m34s
linux-x86-gcc / linux-gcc (Debug) (push) Successful in 2m29s
linux-x86-gcc / linux-gcc (Release) (push) Successful in 2m29s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Debug) (pull_request) Successful in 1m24s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Release) (pull_request) Successful in 1m48s
linux-arm-gcc / linux-gcc-arm (Debug) (pull_request) Successful in 1m37s
linux-arm-gcc / linux-gcc-arm (Release) (pull_request) Successful in 1m37s
linux-arm-gcc / linux-gcc-armhf (Debug) (pull_request) Successful in 1m52s
linux-arm-gcc / linux-gcc-armhf (Release) (pull_request) Successful in 1m48s
linux-mips-gcc / linux-gcc-mipsel (Debug) (pull_request) Successful in 1m52s
linux-mips-gcc / linux-gcc-mipsel (Release) (pull_request) Successful in 1m36s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (pull_request) Successful in 1m25s
linux-mips64-gcc / linux-gcc-mips64el (Release) (pull_request) Successful in 1m38s
linux-riscv64-gcc / linux-gcc-riscv64 (Debug) (pull_request) Successful in 3m7s
linux-riscv64-gcc / linux-gcc-riscv64 (Release) (pull_request) Successful in 1m43s
linux-x64-gcc / linux-gcc (Debug) (pull_request) Successful in 2m7s
linux-x64-gcc / linux-gcc (Release) (pull_request) Successful in 2m13s
linux-x86-gcc / linux-gcc (Debug) (pull_request) Successful in 2m28s
linux-x86-gcc / linux-gcc (Release) (pull_request) Successful in 2m28s

This commit is contained in:
tqcq 2024-06-29 16:25:04 +08:00
parent 8238c310f6
commit 32bda0835a

View File

@ -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());
}