@@ -117,7 +117,7 @@ TEST(coroutine_system, cancel_sleep) {
117
117
}
118
118
119
119
static void test_getaddrinfo (
120
- const char * host, int family, int type, int protocol, const char *service, double timeout) {
120
+ const std::string & host, int family, int type, int protocol, const char *service, double timeout) {
121
121
std::vector<std::string> ip_list = System::getaddrinfo (host, family, type, protocol, service, timeout);
122
122
ASSERT_GT (ip_list.size (), 0 );
123
123
for (auto &ip : ip_list) {
@@ -128,9 +128,17 @@ static void test_getaddrinfo(
128
128
}
129
129
130
130
TEST (coroutine_system, getaddrinfo) {
131
- test::coroutine::run ([](void *arg) {
132
- test_getaddrinfo (TEST_HTTP_DOMAIN, AF_INET, SOCK_STREAM, 0 , " http" , -1 );
133
- test_getaddrinfo (TEST_HTTP_DOMAIN, AF_INET6, SOCK_STREAM, 0 , " http" , -1 );
131
+ std::string domain;
132
+
133
+ if (test::is_github_ci ()) {
134
+ domain = " www.google.com" ;
135
+ } else {
136
+ domain = TEST_HTTP_DOMAIN;
137
+ }
138
+
139
+ test::coroutine::run ([&domain](void *arg) {
140
+ test_getaddrinfo (domain, AF_INET, SOCK_STREAM, 0 , " http" , -1 );
141
+ test_getaddrinfo (domain, AF_INET6, SOCK_STREAM, 0 , " http" , -1 );
134
142
});
135
143
}
136
144
0 commit comments