Skip to content

Commit c2f4508

Browse files
committed
[skip ci] Avoid potential network port conflict in tests
These tests: - ext/standard/tests/network/udp4loop.phpt - ext/sockets/tests/socket_create_listen.phpt - ext/sockets/tests/socket_create_listen-win32.phpt all use port 31338. socket_create_listen.phpt and its win32 variant are mutually exclusive, so they can't conflict. While udp4loop.phpt tries multiple ports, the other tests do not. If udp4loop.phpt runs first and socket_create_listen.phpt starts before it ends, the port is still blocked. Bump the start port for udp4loop.phpt to avoid conflicts.
1 parent c3d6bf6 commit c2f4508

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/tests/network/udp4loop.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Streams Based IPv4 UDP Loopback test
33
--FILE--
44
<?php
55
/* Setup socket server */
6-
for ($port = 31338; $port < 31500; ++$port) {
6+
for ($port = 31339; $port < 31500; ++$port) {
77
$uri = "udp://127.0.0.1:$port";
88
$server = @stream_socket_server($uri, $errno, $errstr, STREAM_SERVER_BIND);
99
if ($server) break;

0 commit comments

Comments
 (0)