@@ -117,7 +117,7 @@ TEST(coroutine_system, cancel_sleep) {
117117}
118118
119119static 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) {
121121 std::vector<std::string> ip_list = System::getaddrinfo (host, family, type, protocol, service, timeout);
122122 ASSERT_GT (ip_list.size (), 0 );
123123 for (auto &ip : ip_list) {
@@ -128,9 +128,17 @@ static void test_getaddrinfo(
128128}
129129
130130TEST (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 );
134142 });
135143}
136144
0 commit comments