Skip to content

Commit f255f4a

Browse files
ai: apply changes for #876 (1 review thread)
Addresses: - #3635910705 at tests/unit/test_auth.py:224 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
1 parent 11579f5 commit f255f4a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/unit/test_auth.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,12 @@ def test_get_tokens_does_not_hang_when_no_callback_received(
223223
# Do not actually launch a browser during the test.
224224
mock_open_new.return_value = True
225225

226+
# Bind to an OS-assigned ephemeral port (0) rather than a fixed port so
227+
# the test does not depend on a specific port being free. A fixed port
228+
# that happens to be occupied would fail to bind and take the
229+
# can't-find-free-port branch instead of the timeout path we exercise.
226230
oauth_manager = OAuthManager(
227-
port_range=[8030],
231+
port_range=[0],
228232
client_id="mock-id",
229233
idp_endpoint=InHouseOAuthEndpointCollection(),
230234
http_client=MagicMock(),

0 commit comments

Comments
 (0)