Skip to content

Commit 8a83895

Browse files
committed
test: fix failed name resolution test for some envs
Under certain network conditions it is possible that getaddrinfo() will return EAI_AGAIN rather than EAI_NONAME for an unknown host. It can be easily reproduced when a network interface is down, however it is not the only case when EAI_AGAIN appears. It seems some DNS servers may report a temporary failure in case of an unknown hostname (at least it looks so, I am unable re-check now).
1 parent 9429f9c commit 8a83895

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/CreateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function test_01_01_double_disconnect() {
4242

4343
/**
4444
* @expectedException TarantoolException
45-
* @expectedExceptionMessageRegExp /Name or service not known|nodename nor servname provided/
45+
* @expectedExceptionMessageRegExp /Name or service not known|nodename nor servname provided|Temporary failure in name resolution/
4646
*/
4747
public function test_02_create_error_host() {
4848
(new Tarantool('very_bad_host'))->connect();

0 commit comments

Comments
 (0)