Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

テストで一時的に使う PHP サーバーのポート番号の重複を避ける #964

Open
seasoftjapan opened this issue Jul 29, 2024 · 0 comments

Comments

@seasoftjapan
Copy link
Contributor

seasoftjapan commented Jul 29, 2024

以下で利用しているポート番号が同一となっている。
tests/class/SC_Response/SC_ResponseSendRedirectWithHeaderTest.php
tests/class/SC_Response/SC_ResponseWithHeaderTest.php

並行実行に対応する際に、問題となるかもしれない。

socket_create_listen() で空きポートを取得できそう。
https://www.php.net/manual/ja/function.socket-create-listen.php#44187

それが駄目でも、もっと大きなポート番号にして、未使用を確認するなどでもマシになりそう。

派生元: https://github.com/EC-CUBE/ec-cube2/pull/960/files/a09269a77362db447e7e059ed1322edaa884761e#diff-82664cf90fc51e9d594303224de4f78db46f94dbb81ef685b8a8a961283e46ef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant