test(pdo_firebird): Fix the dummy server running on localhost to IPv4 #16115
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is related to #16113.
In the pdo_firebird test, a dummy server was created on
localhost
usingstream_socket_server()
to test for error responses that do not normally occur.stream_socket_get_name()
was used to generate the name of the dummy server, but this function seems to return the IPv6 address::1
even in host environments where IPv6 is not available. As a result, in certain environments it was not possible to connect to the dummy server, and the test failed.This problem is solved by creating a server on
127.0.0.1
and fixing it to IPv4, rather than creating it onlocalhost
and leaving the choice of IPv6 or IPv4 tostream_socket_get_name()
.