fix on_init crash #3
@ -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());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user