fix on_init crash #3

Merged
tqcq merged 9 commits from feat/support_fiber into master 2024-07-01 09:47:56 +08:00
Showing only changes of commit 32bda0835a - Show all commits

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